HTML Page Structure: Headings and Landmarks Review
Build an explicit heading hierarchy
Headings communicate the hierarchy of topics. Use h1 for the page’s primary topic, h2 for major subsections, and h3 for their subsections when appropriate. Section nesting does not automatically adjust heading ranks in accessibility tools. Avoid jumping down ranks simply to obtain smaller text; moving back up to close a subsection is fine.
<main> <h1>Hiking guide</h1> <section> <h2>Routes</h2> <h3>Forest trail</h3> <p>Two kilometers.</p> </section> <section> <h2>Equipment</h2> <p>Bring sturdy shoes.</p> </section></main>The heading ranks are 1, 2, 3, 2, reflecting the hierarchy.
Combine navigation and landmarks
Place a skip link before repeated navigation so keyboard users can reach main content more directly. Its href must target an existing ID; tabindex="-1" on main allows it to receive focus without adding it to the normal Tab sequence. Give repeated navigation regions distinct names when they serve different purposes.
<a href="#content">Skip to content</a><header> <nav aria-label="Primary"> <a href="#content">Guide</a> </nav></header><main id="content" tabindex="-1"> <h1>Visitor guide</h1> <p>Welcome.</p></main><footer> <nav aria-label="Footer"> <a href="#content">Back to guide</a> </nav></footer>The skip link has a valid focusable target, and the navigation regions have distinct names.
Assemble a complete semantic page
Use the document structure learned earlier, then combine a page header, primary content, related material and footer. Give significant regions accessible names when useful. This example is self-contained and uses links to existing IDs. Inspect the browser’s heading and landmark lists, not just the visual result.
<!doctype html><html lang="en"> <head> <meta charset="utf-8"> <title>Library guide</title> </head> <body> <a href="#main-content">Skip to content</a> <header> <p>City library</p> <nav aria-label="Primary"> <a href="#hours">Hours</a> </nav> </header> <main id="main-content" tabindex="-1"> <h1>Library guide</h1> <section aria-labelledby="hours"> <h2 id="hours">Hours</h2> <p>Open Monday to Friday.</p> </section> <section> <h2>Services</h2> <p>Borrow books and study.</p> </section> </main> <aside aria-labelledby="help"> <h2 id="help">Related help</h2> <p>Ask at the desk.</p> </aside> <footer> <p>City library information.</p> </footer> </body></html>The document includes a single main, named regions, an explicit heading hierarchy, and working fragment targets.
Common mistakes and practice
Use meaningful native elements, but avoid adding redundant roles or turning every section into a landmark. Verify keyboard navigation and screen-reader behavior in the real page. Browser structure checks are helpful, not proof of full accessibility. Practice by building a small page with the same structure and different content.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
HTML Page Structure: Headings and Landmarks Review — Knowledge Check
Apply the semantic HTML and page structure concepts from this lesson.
What heading sequence best describes a page topic, a subsection and a nested topic?
What must a fragment skip link point to?
Which check is still necessary after a DOM structure test passes?
A skip link targets main but the ID is missing. What is the first correction?
A page uses h4 for its first subsection only because it looks smaller. What should change?