How accessible is your website?Start free check
Accessibility Basics

What is a heading? Examples and rules for web pages

Clara BailyPublished 3 min read

Blog cover with the title What is a heading and a line drawing of floating labels with one highlighted

Key takeaways

  • A heading is a short title that introduces a section of content.
  • On web pages, headings are coded as h1 to h6, from the main title down to sub-sections.
  • Screen reader users jump from heading to heading to scan a page, the way sighted readers skim.
  • Pick the level by structure, not by font size, and don't fake headings with bold text.

A heading is a short title that introduces a section of content. On web pages, headings are coded with the HTML elements h1 to h6, so that people, screen readers and search engines can see how the page is organized.

Think of headings as the table of contents of a page. Sighted readers skim them to find the part they need. Screen reader users do exactly the same, by jumping from heading to heading with a single key.

What headings look like in HTML

There are six levels. h1 is the main title, h2 marks the main sections, h3 the sub-sections inside them, and so on.

html
<h1>Running shoes</h1>
  <h2>Road running</h2>
    <h3>Cushioned shoes</h3>
    <h3>Lightweight shoes</h3>
  <h2>Trail running</h2>
    <h3>Waterproof shoes</h3>

Read the headings alone and you understand the page. That's the test every heading structure should pass.

Why headings matter for accessibility

A page without real headings is a wall of text for a screen reader user. They can't skip to the section they need, so they have to listen to everything from the top. With headings, they open a list of all headings, pick one and jump there.

That's why headings sit in two WCAG criteria. 1.3.1 Info and Relationships requires that text that looks like a heading is also coded as one. 2.4.6 Headings and Labels requires that headings describe the content they introduce.

The five rules for good headings

  1. One h1 per page

    The h1 is the page title, the thing the page is about. On a product page, it's the product name. On an article, the article title.

  2. Pick the level by structure, not by size

    An h3 isn't "a smaller h2". It's a sub-section of an h2. If you want a different size, change the CSS, not the level.

  3. Don't skip levels going down

    After an h2, the next deeper level is h3, not h4. Going back up, from h4 to h2, is fine when a new section starts.

  4. Never fake a heading

    Bold, large text in a paragraph looks like a heading but isn't one. Screen readers and search engines don't see it.

  5. Write headings that describe the section

    "Delivery times for Europe" tells the reader something. "More info" doesn't.

The W3C's headings tutorial shows more examples for complex layouts like sidebars and footers.

The most common heading mistakes

  • Styling text as a heading instead of using a heading element. Very common in page builders, where a text block gets a big font.
  • Using headings for styling. A small note in an h4 because "it looks right" breaks the outline.
  • Several h1s on one page. HTML allows it, but one clear h1 makes the page easier to understand.
  • Empty headings. A heading element with no text, often left behind by a deleted block, shows up as "heading level 2, blank".
  • Theme headings in the wrong order. Some themes put widget titles in h2 or h4 regardless of the page structure.

How to check your headings

Install a free browser extension that shows the heading outline, or run a WCAG scan, which flags empty headings and skipped levels. Then read the outline alone. If it reads like a table of contents for the page, your headings work.

How allyWay solves heading issues

allyWay checks every page for empty headings, skipped levels and other structure issues as part of its WCAG 2.2 AA scan, in about 10 seconds. After the 2-minute setup, allyWay finds and fixes accessibility issues automatically and continuously with AI, and checks every new page you publish.

That matters for headings in particular, because they break with every new page builder block and theme update. Agencies run allyWay under their own brand across every client site.

What is the difference between a heading and a title?

The title is the text in the browser tab, set with the title element. The h1 is the main heading on the page itself. Both should describe the page, and they're often similar.

How many h1 headings should a page have?

One. It names the page. Sections below it use h2 to h6.

Do headings affect SEO?

Yes. Search engines use headings to understand the structure and topics of a page, so descriptive headings help them as much as they help readers.

Can I skip heading levels?

Not going down. After an h2 comes an h3, not an h4. Going back up to a higher level when a new section starts is fine.

Share this article

Sources

  1. W3C: Headings tutorial
  2. W3C: Understanding Success Criterion 1.3.1 Info and Relationships
  3. W3C: Understanding Success Criterion 2.4.6 Headings and Labels
  4. MDN: The HTML section heading elements

About the author

Clara Baily

Accessibility specialist

Clara Baily has been on the allyWay team from the start. She has looked after every accessibility product the team has built, including OneTap, which runs on more than 80,000 websites, AltPilot and the internal accessibility checker. She writes about WCAG, accessibility laws and fixes that work on real websites.

Let AI Handle Website Accessibility

Built in Europe. Set up in 2 minutes, no developer needed. Put website accessibility on autopilot with AI-powered fixes and automated monitoring.

  1. 1Choose your plan
  2. 2Install in 2 min
  3. 3AI fixes your website
  4. Done