Headings, Landmarks and the Page Outline
Work through a small news front page: wrap its regions in landmark elements, give it a heading hierarchy that describes the content, and read back the outline a browser builds from it.
Contentsand lesson path
On this page
- The problem
- Step 1: name the regions with landmarks
- Step 2: build the heading outline
- Step 3: read back the outline
- Common mistakes
- Check your understanding
- Apply it
- Review prompt
Lessons of Semantic HTML
- Anatomy of an HTML Document Concept · 15 min
- Headings, Landmarks and the Page Outline Worked example · 20 min
- Choosing Elements by Meaning, Not Looks Concept · 20 min
- Alternatives and Labels for Images, Media and Inputs Concept · 20 min
- Lab: Mark Up an Article Page and Inspect Its Accessibility Tree Lab · 30 min
- Check: Spot the Semantic Errors Knowledge check · 8 questions
What you will learn
- Structure a page with a correct document skeleton, metadata, a logical heading hierarchy and landmark elements (header, nav, main, footer).
01. The problem
A local news site, the Harbour City Notice Board, has a front page built the way many pages start life: a stack of div elements, each given a class so CSS can make it look right. It renders correctly, and nothing about it is broken — until you ask what the page is.
A visitor with a screen reader hears one undivided stream of text. A visitor skimming on a phone cannot jump to the tide times. A search engine sees no headline, only same-sized words. The visual design said "this is the site banner, this is the news, this is a sidebar", but that knowledge lived in CSS class names, which no software reads as meaning.
This lesson rebuilds the page with two tools that put the meaning into the markup itself: landmark elements that name the major regions of the page, and a heading hierarchy that describes the content inside them.
02. Step 1: name the regions with landmarks
Five elements cover most pages: header for introductory content, nav for major groups of navigation links, main for the content unique to this page, aside for tangential content, and footer for closing information. Assistive technology turns each into a landmark that users can jump straight to, and browsers use them for reader modes and the reading list. The skeleton with the page content still to come looks like this:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Harbour City Notice Board</title>
</head>
<body>
<header>
<p class="brand">Harbour City Notice Board</p>
<nav aria-label="Site sections">
<ul>
<li><a href="/news">News</a></li>
<li><a href="/weather">Weather</a></li>
<li><a href="/notices">Notices</a></li>
</ul>
</nav>
</header>
<main>
<!-- the articles go here (step 2) -->
</main>
<aside>
<h2>Tide times</h2>
<p>High water at 08:12 and 20:35 today.</p>
</aside>
<footer>
<p>© 2026 Harbour City Notice Board</p>
</footer>
</body>
</html>Three details carry most of the weight here.
- The site name in the header is a
p, not a heading. It repeats on every page of the site; headings are for the structure of this page's content. - The navigation is a
ulof links insidenav, and thenavhasaria-label="Site sections". Pages often have more than one list of links — a menu at the top, related links at the bottom — and the label lets users tell them apart ("navigate to Site sections" instead of an unnamed "navigation"). - There is exactly one
main, and it contains the content that makes this page different from every other page on the site. Everything that repeats — the banner, the menu, the copyright line — stays outside it.
03. Step 2: build the heading outline
Headings (h1 to h6) are the table of contents of the page. In WebAIM's survey of screen reader users (December 2023 to January 2024), 71.6% of respondents said that on a long page they first navigate through the headings to find information; 3.7% start with landmarks. The rule is mechanical, which is good news: one h1 naming the page, then h2 for each top-level section, h3 for subsections, and so on — never skipping a level on the way down.
The news page gets an h1 for the weekly overview, an h2 per article, and h3 for the sub-parts of the long article:
<main>
<h1>This week at the harbour</h1>
<article>
<h2>Ferry timetable changes on Monday</h2>
<p>The cross-channel ferry moves to its winter timetable on
2 November.</p>
<h3>What changes</h3>
<p>The first crossing leaves at 06:40 instead of 06:10.</p>
<h3>What stays the same</h3>
<p>Weekend crossings keep the summer slots.</p>
</article>
<article>
<h2>Pier repair work continues</h2>
<p>The east pier stays closed until the decking is replaced.</p>
</article>
</main>article marks each story as a self-contained item that would still make sense on its own — in a feed, shared, or read alone. The heading inside it is an h2 because the story sits one level under the page's h1. The subsections "What changes" and "What stays the same" are h3: one level under their article, no more. Level follows structure; appearance follows later, in CSS.
Notice that the tide box in the aside also got an h2. Being outside main does not remove it from the outline: landmarks and headings are two independent views of the same page, and every heading belongs to exactly one level.
04. Step 3: read back the outline
Now check what you built. A small script can walk the finished file and print every heading at its indent level, then list the landmarks in document order:
h1: This week at the harbour
h2: Ferry timetable changes on Monday
h3: What changes
h3: What stays the same
h2: Pier repair work continues
h2: Tide times
landmarks: header > nav > main > aside > footerRead that outline as if you were skimming the page. It answers "what is here?" in seven lines: the weekly overview, two stories, and a tide box. The indent steps show the structure — two stories under the overview, two sub-parts inside the first story. If a line were indented two steps below its neighbour, the script (and any screen-reader user) would wonder what happened to the level in between.
The same information is visible in browser DevTools: the Elements panel shows the elements, and the Accessibility panel (Chrome: Elements, then the Accessibility pane; Firefox: the Accessibility Inspector) shows the roles they become — banner, navigation, main, complementary, contentinfo. You will inspect that tree properly in the lab.
05. Common mistakes
06. Check your understanding
07. Apply it
Take a page you have built — or the file the skill's practice task starts from — and do the same three moves: wrap the regions in header, nav, main, aside and footer; give the page one h1 and work down from there; then print or inspect the outline and fix every skipped level. The skill's full practice task is exactly this conversion, plus naming images and controls, which the next lessons cover. For the element vocabulary beyond landmarks, see /skills/semantic-html.
08. Review prompt
From memory: list the five landmark elements and what each is for, say where a header stops counting as the banner, and explain why the site name in the header should not be a heading. Then sketch the heading outline of the last article you read, and check it against the real page.
References
Your progress
Reading state
Sign in to save that you finished reading this lesson.
Prove this skill
8 questions · about 6 minutes · scored automatically. Marking a lesson as read never demonstrates a skill.