// glossary

Header Tags (H1–H6): How to Structure Pages for SEO

Header tags (H1–H6) are the HTML elements that give a page its outline. Learn how to nest H1 through H6 correctly for SEO, accessibility, and AI Overviews.

// updated:

Header tags are the H1–H6 HTML elements that define the headings and subheadings on a page, giving it a machine-readable outline. They are how a crawler, a screen reader, and an AI extraction model all figure out what your page is about and how its sections relate. Get the hierarchy right and the rest of your on-page work has a skeleton to hang on; get it wrong and even strong content reads as an undifferentiated wall.

Header Tags

Header tags are the six HTML heading elements (<h1> through <h6>) that mark up a page’s headings and subheadings, expressing content hierarchy and section importance to both users and search engines.

What header tags actually do

A header tag is not styling. It is structure that happens to have a default visual style attached. The distinction matters because Google, assistive technology, and large language models all read the semantic tag, not the font size you painted on with CSS. A line of text that looks like a heading but is wrapped in a <div> with a 28px font is invisible as a heading — it carries no outline weight at all.

The six levels form a strict nesting order:

  • H1 — the page’s single primary title. One per page, describing the whole page.
  • H2 — major sections under the H1.
  • H3 — subsections that belong to a specific H2.
  • H4 — finer detail beneath an H3 (step lists, technical sub-points).
  • H5 — minor subheadings, used sparingly on dense pages.
  • H6 — the lowest structural level; rarely needed in practice.

Because the H1 carries its own weight as the page’s main heading, we treat it as a separate problem with its own rules — see our full breakdown in H1 tag. This entry is about the whole ladder and how the rungs relate.

The fastest header audit we run: strip all CSS and read the page as a plain outline. If that outline tells the story of the page on its own, the headers are doing their job. If it reads as gibberish, no amount of body copy will save it.

Why header structure earns rankings

Headers do four jobs at once, and only one of them is “SEO” in the narrow sense.

They tell crawlers what each section covers. Google uses heading text as a strong relevance signal for the passage beneath it. A clear H2 like “Cost of a programmatic SEO build” anchors that section to a query intent far better than the same words buried in paragraph three.

They make pages eligible for SERP features and AI answers. Featured snippets are routinely lifted from the paragraph or list directly under a question-shaped H2 or H3. In the AI Overviews era, extraction models lean on heading hierarchy to chunk a page into answerable units — a well-nested page is simply easier to quote. Loose, flat structure makes your content harder to cite.

They drive readability and engagement. Most people scan headings before they read a word of body copy. Descriptive headers reduce bounce rate and lift dwell time because readers find their answer fast instead of bailing.

They are accessibility infrastructure. Screen-reader users navigate by jumping between headings. A page that skips from H2 to H4, or that uses heading tags purely for visual sizing, is genuinely harder to use with assistive technology — and Google has been explicit that the experience signals it cares about include accessibility under E-E-A-T.

The six tags at a glance

TagRolePer pageCommon mistake
H1Page’s primary titleExactly oneMultiple H1s, or none
H2Major sectionsAs many as neededSkipping straight to H3
H3Subsections under an H2As neededUsed out of order for styling
H4Detail under an H3SparinglyTreated as a “small H2”
H5Minor subheadingsRarelyDecorative use
H6Lowest structural levelAlmost neverFiller that adds no structure

The pattern that holds across all six: descend one level at a time, never skip on the way down. You can jump back up (an H4 followed by the next H2 is fine), but you should not leap from H2 to H4 because there’s no H3 between them to explain the relationship.

How to use header tags well

Keep one H1, near the top, that names the page. Multiple H1s won’t earn a manual penalty, but they dilute the single clearest signal you have. Mirror the page’s primary intent — see primary keywords — without forcing an exact match.

Map H2s to subtopics and the questions real searchers ask. This is where semantic SEO lives. Each H2 should cover a distinct facet of the topic, ideally phrased the way someone would search it. Question-shaped H2s (“How much does X cost?”) are snippet and AI-answer bait when paired with a tight answer underneath.

Write headers for humans first. Concise, descriptive, accurate. A header that overpromises the section below it raises bounce and erodes trust. Avoid keyword density games — a header reading “Best Best Cheap Accounting Software Cheap” is keyword-stuffed nonsense that signals low quality to both users and ranking systems.

Make the page’s heading map deliberate at the site level. On large builds we treat header structure as part of SEO site structure: consistent H2 patterns across a template, headers that mirror the query clusters a page targets, and no two pages fighting over an identical H1. That consistency is what makes programmatic pages legible at scale, which is the whole point of our programmatic SEO work.

Use CSS for looks, headings for structure. If a heading is too big, restyle it — don’t demote it to an H4 to shrink it, and don’t promote body text to an H2 to enlarge it. The semantic tag and the visual size are independent decisions.

A correct nesting example

<h1>Programmatic SEO: Build Pages at Scale</h1>
  <h2>What programmatic SEO is</h2>
  <h2>When it works (and when it doesn't)</h2>
    <h3>Good-fit data sources</h3>
    <h3>Intent signals to validate first</h3>
  <h2>How we build a pSEO system</h2>
    <h3>Template design</h3>
      <h4>Header map per template</h4>
    <h3>Quality gates</h3>

Read the indentation as the outline. Every level descends by one, every H3 has a parent H2, and the H4 sits cleanly under its H3. That is the entire discipline.

Frequently Asked Questions

How many H1 tags should a page have?

One. A single H1 gives search engines and screen readers an unambiguous “this is what the page is about” signal. Modern HTML5 technically permits multiple H1s inside sectioning elements, but in practice one H1 per page remains the safest, clearest choice for SEO and accessibility.

Do header tags affect Google rankings?

Indirectly but meaningfully. Headers aren’t a direct ranking factor you can dial up, but they tell Google what each passage covers, improve relevance matching, make pages eligible for featured snippets and AI Overview citations, and boost the engagement signals (lower bounce, higher dwell) that correlate with ranking well.

Is it bad to skip header levels, like H2 to H4?

Yes, when descending. Jumping from H2 straight to H4 breaks the logical outline, confuses screen-reader navigation, and weakens the structural signal crawlers rely on. Descend one level at a time (H2 then H3 then H4). Jumping back up — an H4 followed by the next H2 — is perfectly fine.

What’s the difference between an H1 and the other header tags?

The H1 names the entire page and should appear exactly once; H2 through H6 divide that page into a nested hierarchy of sections and subsections. Because the H1 carries the most weight, it has its own best practices, which we cover in our H1 tag entry.

Should keywords go in header tags?

Naturally, yes — forced, no. Place relevant terms in H1, H2, and H3 where they fit the way a reader would actually phrase the topic. This reinforces semantic context without stuffing. Prioritize clarity and accuracy over exact-match repetition; a header that misleads about its section does more harm than any keyword does good.

If your headers are a mess sitewide — duplicate H1s, decorative H2s, no logical nesting — that’s exactly the kind of structural debt our AI SEO services clean up before chasing rankings. Fix the skeleton first; everything else has somewhere to attach.

// related services

Put this knowledge to work

// ready to put it all together?

Founder-led SEO.
No dashboard theater.

Book a call →

// or send a message

Tell us
about your site.

Drop your URL and we’ll give you an honest read — no pitch, no obligation. Prefer to talk live? Book a call →

// 30 min · intro, founder-to-founder

Book a call