edubun
English
1 / 18

2 / 6 · Intermediate

Heading structure and landmarks

A common way to read a page with a screen reader is to jump from heading to heading, so a page with no h2 elements reads like a book with no chapters.

Jump to the 9 practice questions

You will learn

  • Use real h1 to h6 elements so headings can be listed and jumped to
  • Build an outline without skipped levels
  • Mark page regions with landmark elements

Before this: Alternative text for images

1Explore

Skimming by headings

Sighted readers skim. They glance at the big bold lines, find the section they want and start reading there. Screen reader users do the same thing with headings. MDN notes that a common technique is to jump quickly from heading to heading to work out what a page contains, and that most screen readers can list every heading on the page.

"Bread" looks like a heading but is a div, so the screen reader reads it as plain text. "Opening hours" is a real h2.

Your code
<style>
  .title { font-size: 1.5em; font-weight: bold; }
</style>
<h1>Corner Bakery</h1>
<div class="title">Bread</div>
<p>Sourdough, rye and white loaves.</p>
<h2>Opening hours</h2>
<p>Every day from 7 am.</p>
Preview
What a screen reader announces (simplified)

    2Problem

    A big bold div

    A div with large bold text is read by a screen reader as

    Hint

    Look at how "Bread" is announced above.

    Solution

    Answer: ordinary text

    Only h1 to h6 (or the heading role) are announced as headings.

    3Explain

    What WCAG asks

    WCAG 2.2 covers this in success criterion 1.3.1 Info and Relationships, at level A: structure that is shown visually must also be available in the code. Criterion 2.4.6 Headings and Labels, at level AA, adds that headings must describe the topic of their section. A heading such as "More" or "Section 2" may not explain its topic. A clearer heading names the subject, such as "Opening hours".

    4Problem

    Headings that describe

    Which criterion asks that headings describe their topic?

    Hint

    The criterion has "Headings" in its name.

    Solution

    Answer: 2.4.6 Headings and Labels

    Criterion 2.4.6, level AA, requires headings to describe their topic. Correct heading tags alone do not help someone choose a section if the words are vague.

    5Problem

    "Section 2"

    Is a heading "Section 2" a good heading?

    Hint

    Does it say what the section is about?

    Solution

    Answer: No, it does not say what the section is about

    In this example, “Section 2” alone gives no clue to the topic. A more descriptive heading helps users find the section; context can affect the assessment.

    6Explain

    Three rules for levels

    First, do not skip levels. Go from h1 to h2 to h3. Someone who hears an h4 straight after the h1 is left wondering where the missing levels went. Second, prefer a single h1 per page that names its content, much like the title element. The HTML standard allows more than one, but MDN describes one h1 as the usual best practice. Third, do not choose a heading level for its size. If an h3 looks too small, change the font size in CSS and keep the level that matches the structure.

    One h1 names the page. Each h2 starts a section, and each h3 sits inside the h2 above it.

    7Problem

    After an h1

    Which comes right after an h1 in a well-built outline?

    Hint

    Do not skip a level.

    Solution

    Answer: h2

    Do not skip levels: h1, then h2.

    8Problem

    An h3 that looks small

    An h3 looks too small for the design. What should you do?

    Hint

    Size is a CSS job.

    Solution

    Answer: Keep h3 and change font-size in CSS

    Levels follow structure; size is a CSS job.

    9Problem

    A recipe outline

    Put these headings in outline order for a recipe page.

    1. h2 Method
    2. h3 Shaping the loaf
    3. h1 Rye bread
    4. h2 Ingredients
    Hint

    One h1, then sections, with the sub-step inside its section.

    Solution

    Answer:

    1. h1 Rye bread
    2. h2 Ingredients
    3. h2 Method
    4. h3 Shaping the loaf

    One h1, then sections, with the sub-step inside Method.

    10Explore

    Landmarks

    Headings divide the content; landmarks divide the page into regions. The elements header, nav, main and footer each carry a built-in role. A screen reader can therefore offer a list of regions and jump straight to the main content or the navigation. A page normally has one main. You get these roles for free by choosing the right element, which is the first rule of ARIA in action: no extra attributes needed.

    header, nav, main and footer are announced as regions a listener can jump between.

    Your code
    <header>
      <nav>
        <a href="/">Home</a> <a href="/menu">Menu</a>
      </nav>
    </header>
    <main>
      <h1>Corner Bakery</h1>
      <h2>Bread</h2>
      <h3>Sourdough</h3>
    </main>
    <footer>12 Mill Lane</footer>
    Preview
    What a screen reader announces (simplified)

      11Problem

      What landmarks are for

      What do landmark elements let screen reader users do?

      Hint

      Look at the region lines in the list above.

      Solution

      Answer: Jump straight to regions such as the main content

      Regions such as main and nav appear in a list the user can jump to.

      12Problem

      How many main?

      How many main elements does a page normally have?

      Hint

      The single main content area.

      Solution

      Answer: One

      main marks the single main content area.

      13Problem

      The navigation element

      Which element marks a block of navigation links?

      Hint

      Three letters.

      Solution

      Answer: nav

      The nav element carries the navigation landmark role.

      14Practice

      Real headings

      The two section titles are divs styled to look like headings. Turn them into real h2 elements.

      Checks
      • h1 kept
      • two h2 headings
      • no fake headings left
      Your code
      <style>
        .title { font-size: 1.5em; font-weight: bold; margin: 1em 0 .3em; }
      </style>
      
      <h1>Corner Bakery</h1>
      <div class="title">Bread</div>
      <p>Sourdough, rye and white loaves.</p>
      <div class="title">Opening hours</div>
      <p>Every day from 7 am.</p>
      Preview
      Hint

      Both divs become h2.

      A solution
      <style>
        .title { font-size: 1.5em; font-weight: bold; margin: 1em 0 .3em; }
      </style>
      
      <h1>Corner Bakery</h1>
      <h2>Bread</h2>
      <p>Sourdough, rye and white loaves.</p>
      <h2>Opening hours</h2>
      <p>Every day from 7 am.</p>

      15Practice

      Fix the levels

      The levels jump from h1 to h4. Make Bread and Cakes h2, and Birthday cakes an h3 inside Cakes.

      Checks
      • two h2 headings
      • Birthday cakes is h3
      • no h4 or h5 left
      Your code
      <h1>Corner Bakery</h1>
      <h4>Bread</h4>
      <p>Baked before 7 am.</p>
      <h4>Cakes</h4>
      <p>Order a day ahead.</p>
      <h5>Birthday cakes</h5>
      <p>Any size, any name.</p>
      Preview
      Hint

      h4 becomes h2, and h5 becomes h3.

      A solution
      <h1>Corner Bakery</h1>
      <h2>Bread</h2>
      <p>Baked before 7 am.</p>
      <h2>Cakes</h2>
      <p>Order a day ahead.</p>
      <h3>Birthday cakes</h3>
      <p>Any size, any name.</p>

      16Practice

      nav and main

      Wrap the three links in a nav and the heading and paragraph in a main.

      Checks
      • three links inside nav
      • h1 inside main
      Your code
      <a href="/">Home</a>
      <a href="/menu">Menu</a>
      <a href="/contact">Contact</a>
      
      <h1>Corner Bakery</h1>
      <p>Fresh bread every morning.</p>
      Preview
      Hint

      Two wrappers: nav around the links, main around the heading and text.

      A solution
      <nav>
      <a href="/">Home</a>
      <a href="/menu">Menu</a>
      <a href="/contact">Contact</a>
      </nav>
      
      <main>
      <h1>Corner Bakery</h1>
      <p>Fresh bread every morning.</p>
      </main>

      17Explain

      Common mistakes

      Mistake
      <h1>Corner Bakery</h1>
      <h4>Opening hours</h4>
      <p>Every day from 7 am.</p>
      Fixed
      <style>
        h2 { font-size: 1em; }
      </style>
      <h1>Corner Bakery</h1>
      <h2>Opening hours</h2>
      <p>Every day from 7 am.</p>

      h4 was picked for its small size, which skips two levels. Use h2 and make it small with CSS.

      18

      Summary

      • Screen reader users move through a page by its headings.
      • Use real h1 to h6, one h1, and no skipped levels.
      • Headings describe their section (WCAG 2.4.6).
      • header, nav, main and footer give regions for free.

      Next unitColour contrast
      Full text · The whole lesson as one text

      Headings are a table of contents

      Sighted readers skim. They glance at the big bold lines, find the section they want and start reading there. Screen reader users do the same thing with headings. MDN notes that a common technique is to jump quickly from heading to heading to work out what a page contains, and that most screen readers can list every heading on the page. That only works if the headings are real h1 to h6 elements. A paragraph made big and bold with CSS looks like a heading but is announced as ordinary text.

      WCAG 2.2 covers this in success criterion 1.3.1 Info and Relationships, at level A: structure that is shown visually must also be available in the code. Criterion 2.4.6 Headings and Labels, at level AA, adds that headings must describe the topic of their section. A heading such as "More" or "Section 2" may not explain its topic. A clearer heading names the subject, such as "Opening hours".

      One h1 names the page. Each h2 starts a section, and each h3 sits inside the h2 above it.

      Three rules from MDN

      First, do not skip levels. Go from h1 to h2 to h3. Someone who hears an h4 straight after the h1 is left wondering where the missing levels went. Second, prefer a single h1 per page that names its content, much like the title element. The HTML standard allows more than one, but MDN describes one h1 as the usual best practice. Third, do not choose a heading level for its size. If an h3 looks too small, change the font size in CSS and keep the level that matches the structure.

      Writing headings people can use

      A heading list is only as good as its words. Put the useful word first, because people scanning a list of twenty headings hear the start of each and move on: "Opening hours" works better than "When you can visit us". Keep headings short and different from each other, so two sections are never both called "Details". Then test the outline. The accessibility panel in a browser's developer tools, or a screen reader's heading list, shows the headings alone. Read them in a row and ask whether they make sense as a table of contents. If they do, sighted skimmers benefit too.

      Landmarks

      Headings divide the content; landmarks divide the page into regions. The elements header, nav, main and footer each carry a built-in role. A screen reader can therefore offer a list of regions and jump straight to the main content or the navigation. A page normally has one main. You get these roles for free by choosing the right element, which is the first rule of ARIA in action: no extra attributes needed.

      <header>
        <nav>
          <a href="/">Home</a> <a href="/menu">Menu</a>
        </nav>
      </header>
      <main>
        <h1>Corner Bakery</h1>
        <h2>Bread</h2>
        <h3>Sourdough</h3>
      </main>
      <footer>12 Mill Lane</footer>
      Landmark elements around a heading outline with no skipped levels.
      The h1 and the title element usually say nearly the same thing. The title names the browser tab and is the first thing a screen reader reads when the page opens; the h1 starts the content. If they disagree, people wonder whether they landed on the right page.
      Key points
      • Screen reader users move through a page by its headings.
      • Use real h1 to h6, one h1, and no skipped levels.
      • Headings describe their section (WCAG 2.4.6).
      • header, nav, main and footer give regions for free.

      Try reading the heading list without looking at the paragraphs below it. You should be able to predict where a question about the page belongs. If several entries say the same thing, rename them before changing their appearance. Next compare their levels with the sections they introduce. A subsection should belong to the section above it, even when the design uses a smaller font for the main heading. This checks meaning separately from visual styling.

      Practice questions from Heading structure and landmarks on edubun

      Embed this quiz

      Free to embed. Please keep the credit line.

      Sources for this course (8)
      • W3C, Web Content Accessibility Guidelines (WCAG) 2.2, W3C Recommendation first published 5 October 2023, current edition 12 December 2024 (w3.org/TR/WCAG22/, checked 2026-10-17)
      • W3C WAI, What's new in WCAG 2.2 (w3.org/WAI/standards-guidelines/wcag/new-in-22/, checked 2026-10-17)
      • W3C WAI, Images tutorial and alt decision tree (w3.org/WAI/tutorials/images/decision-tree/, checked 2026-10-17)
      • W3C, Using ARIA (w3.org/TR/using-aria/, Discontinued Draft 24 February 2026, rules 1 to 4, checked 2026-10-17)
      • W3C WAI-ARIA Authoring Practices Guide, Read Me First, "No ARIA is better than bad ARIA" (w3.org/WAI/ARIA/apg/practices/read-me-first/, checked 2026-10-17)
      • MDN Web Docs, tabindex (developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/tabindex, checked 2026-10-17)
      • MDN, Heading elements, accessibility notes (developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/Heading_Elements, checked 2026-10-17)
      • MDN, autocomplete attribute (developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/autocomplete, checked 2026-10-17).

      Checked: 2026-10-17