Documentation/Single <main> landmark

Single <main> landmark

ZMD020

Require exactly one <main> landmark in each HTML document to provide a clear primary content region.

✅ Good

<html>
  <body>
    <main>
      <h1>Dashboard</h1>
    </main>
  </body>
</html>

❌ Bad

<html>
  <body>
    <main>Overview</main>
    <main>Details</main>
  </body>
</html>

When: An <html> document has no <main> or has more than one <main>

Warning: Only one <main> landmark allowed per document

Solution: Use one primary <main> landmark and move secondary regions to <section>, <aside>, or other landmarks.

Tips & edge cases

  • Keep global navigation, headers, and footers outside <main>.
  • Use semantic sectioning elements inside the single main region for structure.