Semantics

A landmark containing the main content of a document.

Additional info from the ARIA specification

This marks the content that is directly related to or expands upon the central topic of the document. The main role is a non-obtrusive alternative for "skip to main content" links, where the navigation option to go to the main content (or other landmarks) is provided by assistive technologies, or by a user agent or browser extension, through a keyboard shortcut or UI feature such as a side panel or dialog.

Assistive technologies SHOULD enable users to quickly navigate to elements with role main. user agents SHOULD treat elements with role main as navigational landmarks. user agents MAY enable users to quickly navigate to elements with role main.

The author SHOULD mark no more than one element on a page with the main role.

Abstract Role

  • LandmarkRepresents a top-level section of a page, relevant to a specific purpose, that a user may want to scan for quickly and could appear in a site map or table of contents.

Content Categories

  • Flow ContentAn element that structures and organizes the body of a web document.

Allowed Descendants

Flow Children Allowed

No main element descendants allowed.

Usage

Allowed HTML elements

Implicit semantics

These elements have the role semantics by default, without needing to set the role attribute. Reach for elements with native semantics first when choosing how to implement a role in your content.

  • main

Explicitly allowed

  • article[role=main]
  • section[role=main]

Elements that can have any role

  • abbr[role=main]
  • address[role=main]
  • b[role=main]
  • blockquote[role=main]
  • canvas[role=main]
  • cite[role=main]
  • code[role=main]
  • custom-element[role=main]
  • data[role=main]
  • del[role=main]
  • dfn[role=main]
  • div[role=main]
  • em[role=main]
  • figure[role=main]
  • i[role=main]
  • ins[role=main]
  • kbd[role=main]
  • mark[role=main]
  • output[role=main]
  • p[role=main]
  • pre[role=main]
  • q[role=main]
  • samp[role=main]
  • small[role=main]
  • span[role=main]
  • table[role=main]
  • tbody[role=main]
  • tfoot[role=main]
  • thead[role=main]
  • time[role=main]
  • u[role=main]
  • var[role=main]