HTML reference

main

The <main> element identifies the primary content of a document. It helps people using assistive technology jump past repeated navigation and site chrome.

What you will learn

  • What content belongs in main
  • How landmarks support skip navigation
  • How header, nav, and aside differ

Basic structure

<header>Site header</header>
<nav aria-label="Primary">...</nav>
<main id="main-content">
  <h1>Article title</h1>
  <p>Primary content</p>
</main>
<footer>Site footer</footer>

One primary main

A document should normally have one visible main element containing the page-specific content. Do not put repeated site navigation, sidebars, or unrelated advertisements inside it just because they appear near the center visually.

Accessibility tips

Related pages