Rendered from semantic-html/allowed.md

Semantic HTML — Allowed

This unit follows Phase 1 and introduces meaningful page structure before CSS.

Learning goal

Choose HTML elements for the meaning and relationship of their content, not for their default appearance. Document pages that will ship publicly with basic metadata.

HTML tags allowed

Everything from ./phase1-allowed.html, plus:

Attributes allowed

Semantic rules

  1. Use one visible main for the page’s unique primary content.
  2. Keep repeated site navigation, page headers, and page footers outside main.
  3. Use section for a thematic group that normally has a heading.
  4. Use article when the content could stand independently or be reused elsewhere.
  5. Use aside for complementary content, not merely because something appears in a sidebar.
  6. header and footer may describe the whole page or the nearest section/article.
  7. Use nav for major groups of navigation links, not every isolated link.
  8. Give multiple navigation regions distinct accessible names.
  9. Use figure with figcaption when media and its caption form one referenced unit.
  10. Keep div when no semantic element accurately describes the group.
  11. Prefer native HTML meaning over adding a redundant ARIA role.
  12. Maintain a logical heading hierarchy that describes the document.
  13. Public pages should include a unique title, meta description, favicon, and Open Graph tags; add canonical when URL variants exist.
  14. If help appears on multiple pages, keep it in the same relative order (Consistent Help).

Not allowed

Pages