Mental model

Semantic HTML

Using meaningful HTML elements and logically organized headings to communicate page structure and support navigation.

Discover

HTML is the language used to structure web pages; a heading is a title for content. For the main content of a hypothetical cooking guide, choose the overall heading that should come before its sections and subsections.

Which heading starts this guide’s main content?

Learn how meaningful page structure and heading levels support navigation.

Understand

Understand

HTML is the language used to structure web pages. Semantic HTML uses elements that describe the meaning of content, including headings that identify sections and subsections. Navigation tools can use these headings to help people move around a page. Check whether one page’s headings match its sections.

Full explanation

Full explanation

Semantic HTML describes the meaning and structure of web content. W3C’s guidance recommends meaningful elements, identified page regions, and logically nested headings. Headings communicate organization, and browsers and assistive technologies—tools such as screen readers used to access content—can use them for navigation. [1] [2]

For a hypothetical cooking guide, <h1>Cooking guide</h1> could identify the overall topic. <h2>Recipes</h2> could begin a section, and <h3>Soups</h3> could begin a subsection within it. Heading levels describe these relationships: level 1 is the highest rank and level 6 is the lowest. [2]

When opening subsections, avoid skipping heading levels where possible. Moving directly from a level 2 heading to a level 4 heading can be confusing. Returning from level 4 to level 2 is acceptable when the previous subsections end and a new section begins. [2]

Page regions are identifiable areas of a page. Marking up regions and giving them distinguishing labels supports orientation and navigation. A heading can also label a region: the tutorial recommends aria-labelledby, an HTML attribute that associates the region with the heading that names it. [1] [2]

Fixed page sections have an important exception. For a sidebar that stays consistent across pages, the tutorial recommends keeping its heading levels consistent even when levels in the main content vary. Heading organization therefore depends on both content relationships and the role of a section across pages. [2]

These examples assume the headings accurately describe the content beneath them. The guidance explains how structure can support navigation; it does not establish a measured improvement for every user or guarantee that a particular implementation is fully accessible. [1] [2]

Research

Research

  • Official guidance, not experimental evidence: W3C recommends identifying page regions, labeling them so users can distinguish them, and using meaningful content elements. It describes how well-structured pages support orientation and navigation, including access to main content and important sections for screen reader users. [1]
  • Official heading guidance: browsers, plug-ins, and assistive technologies can use headings for navigation within a page. The tutorial recommends logical nesting and avoiding skipped levels where possible, while allowing a return to a higher-level heading when closing subsections. [2]
  • Context-dependent guidance: fixed page sections, such as sidebars, should retain consistent heading levels across pages even when the main content’s heading levels vary. The tutorial also recommends associating headings with their page regions using aria-labelledby. [2]

Limitations

Limitations

The earlier citation presented as “Semantic Table-of-Contents for Efficient Web Screen Reading” was misidentified and is replaced here with the two supplied W3C guidance documents. Neither supplied excerpt reports experiments, study percentages, or measured effects on navigation speed, cognition, fonts, or behavior. The tutorials list related Web Content Accessibility Guidelines (WCAG) success criteria at Levels A, AA, and AAA; that listing does not make every recommendation a universal requirement or establish conformance or legal compliance. The cooking guide is a hypothetical teaching example.

Try it

Synthesize

Choose a pattern from the guide, then pick an action to try with it.

Which pattern stands out?

What will you try?

Choose a pattern above to select an action.

Sources

Sources

Try it

Check your understanding

In a hypothetical guide, `<h2>Recipes</h2>` begins a section. The next heading begins a subsection called Soups. Which choice follows the tutorial’s nesting guidance?

Show the guide's explanation

Answer: <h3>Soups</h3>

Level 3 places Soups directly within the level 2 Recipes section. Level 4 would skip a level when opening the subsection; levels 2 and 1 would begin sections at the same or a higher level.

In a hypothetical guide, a level 4 subsection ends and a new level 2 section begins. Which statement matches the tutorial’s guidance?

Show the guide's explanation

Answer: A level 2 heading may follow because the previous subsections are closing.

The tutorial allows skipped levels when closing subsections. Its advice to avoid skipping levels where possible concerns opening subsections, such as moving directly from level 2 to level 4.

A hypothetical site repeats a fixed sidebar across pages whose main-content heading levels vary. What does the tutorial recommend for the sidebar?

Show the guide's explanation

Answer: Keep its heading levels consistent across pages.

For fixed page sections such as sidebars, the tutorial prioritizes consistency across pages over changing their heading levels in response to the main content.

Keep exploring

Find another idea for the decision in front of you.

The complete Reframo library is free to read. Explore another guide whenever you are ready.