The page-type front matter key

The page-type front matter key describes the type of an MDN page. This allows MDN content tools to better automate content checking and sidebar organization.

Like any other front matter key, the page-type key is specified in the YAML at the start of "index.md":

---
title: Geolocation.getCurrentPosition()
slug: Web/API/Geolocation/getCurrentPosition
page-type: web-api-instance-method
browser-compat: api.Geolocation.getCurrentPosition
---

Each main area of the site — JavaScript, CSS, and so on — has a set of domain-specific page-type values, and there is also a set of generic values that can appear in any area of the site.

This project is a work in progress: so far we have only defined page-type values for CSS, JavaScript, and Web API.

Generic page types

These page types are not specific to a particular MDN technology area:

  • guide: a generic guide page with no specific structure. See Conceptual page.
  • landing-page: a page that acts primarily as a navigation aid, listing links to other pages. See Landing page.

Domain-specific page types

This section lists page types that are specific to a single area of MDN.

CSS page types

This section lists page-type values for pages under Web/CSS. Every page in that part of the tree must have a page-type, and its value must be one of those listed below or one of the generic page type values.

Glossary page types

This section lists page-type values for pages under Glossary. Every page in that part of the tree must have a page-type, and its value must be one of those listed below.

  • glossary-definition: a page defining a term, like Bézier curve.
  • glossary-disambiguation: a page providing links to two or more definition pages for an ambiguous term, like Node.

HTML page types

This section lists page-type values for pages under Web/HTML. Every page in that part of the tree must have a page-type, and its value must be one of those listed below or one of the generic page type values.

  • html-attribute: an HTML attribute, like autocomplete.
  • html-attribute-value: a single value for an HTML attribute, like dns-prefetch.
  • html-element: an HTML element, like <button>.

JavaScript page types

This section lists page-type values for pages under Web/JavaScript. Every page in that part of the tree must have a page-type, and its value must be one of those listed below or one of the generic page type values.

  • javascript-class: a definition of a built-in object, like Array.
  • javascript-constructor: an object constructor, like Array().
  • javascript-error: an error, like RangeError: invalid array length.
  • javascript-function: a built-in function that isn't an object method, like encodeURI().
  • javascript-global-property: a global property like NaN.
  • javascript-instance-accessor-property: an accessor property on an object instance, like Map.prototype.size.
  • javascript-instance-data-property: a data property on an object instance, like the length property of Array.
  • javascript-instance-method: a method on an object instance, like Array.prototype.at().
  • javascript-language-feature: a part of JavaScript syntax not fitting into another category, like rest parameters.
  • javascript-namespace: an object that is not instantiable and has only static members, like Math.
  • javascript-operator: an operator, like Addition (+).
  • javascript-statement: a statement, like switch.
  • javascript-static-accessor-property: a static accessor property, like RegExp.lastMatch.
  • javascript-static-data-property: a static data property, like Math.E.
  • javascript-static-method: a static method, like Array.from().

SVG page types

This section lists page-type values for pages under Web/SVG. Every page in that part of the tree must have a page-type, and its value must be one of those listed below or one of the generic page type values.

  • svg-attribute: an SVG attribute, like crossorigin.
  • svg-element: an SVG element, like <circle>.

Web API page types

This section lists page-type values for pages under Web/API. Every page in that part of the tree must have a page-type, and its value must be one of those listed below or one of the generic page type values.

WebExtensions page types

This section lists page-type values for pages under Mozilla/Add-ons/WebExtensions. Every page in that part of the tree must have a page-type, and its value must be one of those listed below or one of the generic page type values.