The <main> tag

<main> marks the primary content unique to this page — excluding header, footer, sidebar, and anything else repeated across pages.

Syntax

<main>...</main>

Example

<body>
  <header>...</header>
  <main>
    <h1>Article heading</h1>
    <p>Main content...</p>
  </main>
  <footer>...</footer>
</body>

Notes

  • There should be exactly one visible main per document — not several.
  • main should not be nested inside article, aside, footer, header, or nav.

Accessibility

  • main has an implicit ARIA role of main, letting screen reader users jump straight to the primary content (skip navigation).

Related tools