Document & Landmarks
Prev: elements | Up: elements | Next: Text & Lists
Rel: Semantic Document Structure, Critical Rendering Path
Ref: MDN Web Docs — HTML Elements
Tags: #public #web #html #elements
Contents
Minimal Standards-Mode Document
<!DOCTYPE html> triggers standards mode (avoiding quirks mode layout bugs). Set lang on <html>, declare UTF-8 first inside <head>, and include the responsive viewport meta tag.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Document Title</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<header><nav aria-label="Primary"></nav></header>
<main>
<article>
<h1>Article Heading</h1>
<p>Main content.</p>
</article>
<aside>Related links</aside>
</main>
<footer><p>© 2026</p></footer>
</body>
</html>
Landmark Elements
| Element | Implicit ARIA Role | Purpose |
|---|---|---|
<header> |
banner (when top-level) |
Site/section introductory content |
<nav> |
navigation |
Major navigation blocks |
<main> |
main |
Primary unique page content (one visible per page) |
<article> |
article |
Self-contained, syndicatable composition |
<section> |
region (when named) |
Thematic grouping with a heading |
<aside> |
complementary |
Tangentially related content (sidebars, callouts) |
<footer> |
contentinfo (when top-level) |
Metadata, copyright, secondary links |
Linked from
- tuts/html/attributes/aria_and_accessibility_attributes
- tuts/html/elements
- tuts/html/elements/document_and_landmarks
- tuts/html/elements/landmarks
- tuts/html/elements/landmarks/article
- tuts/html/elements/landmarks/aside
- tuts/html/elements/landmarks/body
- tuts/html/elements/landmarks/footer
- tuts/html/elements/landmarks/head
- tuts/html/elements/landmarks/header
- tuts/html/elements/landmarks/html
- tuts/html/elements/landmarks/main
- tuts/html/elements/landmarks/nav
- tuts/html/elements/landmarks/section
- tuts/html/elements/text_and_lists
- tuts/html/tutorials/semantic_document_structure
- tuts/web/rendering/critical_rendering_path
Related notes
- tuts/html/elements Linked here; links to this page; shared tags: #elements, #html, #web
- tuts/html/elements/text_and_lists Linked here; links to this page; shared tags: #elements, #html, #web
- tuts/html/tutorials/semantic_document_structure Linked here; links to this page; shared tags: #html, #web
- tuts/web/rendering/critical_rendering_path Linked here; links to this page; shared tags: #web
- tuts/html/elements/landmarks links to this page; shared tags: #elements, #html, #web
- tuts/html/elements/landmarks/article links to this page; shared tags: #elements, #html, #web
- tuts/html/elements/landmarks/aside links to this page; shared tags: #elements, #html, #web
- tuts/html/elements/landmarks/body links to this page; shared tags: #elements, #html, #web
- tuts/html/elements/landmarks/footer links to this page; shared tags: #elements, #html, #web
- tuts/html/elements/landmarks/head links to this page; shared tags: #elements, #html, #web