Why doesn’t AI mention your brand? Find out which half is brokenGet a free report
LLMention
Explainer

Heading hierarchy for extraction, not just SEO

One H1, real H2 sections, landmarks — but the reason is extraction, not a checklist. What a heading does for a passage, and what it does not.

By Alex Xu9 min read

Headings are usually discussed as an SEO convention: one H1, H2s for sections, don't skip levels. The convention is right, but the reason usually given is incomplete. Headings are not just a keyword structure; they are the boundaries a parser uses to cut a page into passages, and the labels it attaches to them. A page with a clean outline is easier to quote; a page with four H2s that all say "Overview" is four sections to a counter and one blur to a reader.

This article is about the extraction view of hierarchy: what the heading outline does, how the scanner scores it, and the patterns that pass the checks while leaving the document harder to use.

What a heading does for a parser

A page is a sequence of blocks. To answer a question from it, a system has to decide where one passage ends and the next begins. The heading is the cheapest boundary available: it is explicit in the markup, it usually names the topic of what follows, and it can be read without understanding the prose.

That gives a heading three jobs. It marks a boundary, it labels the passage, and it states the level of the section. A heading that does only the first (a decorative label), or mislabels the passage, or sits at the wrong level, weakens all three.

The outline failures that matter

FailureWhat it does to extractionWhy it is easy to miss
No H1, or severalThe page has no single name, or several competing ones.Visually, one of them is just larger text.
H3 before any H2The outline implies a parent section that does not exist.Browsers do not care; the page looks fine.
Generic headings ("Overview", "Details")Passages are labelled with words that do not distinguish them.They read as tidy to the author, who knows the context.
Card titles as headingsA list page produces dozens of headings that are not sections.Each card is individually reasonable.
Headings used for stylingThe outline claims structure the content does not have.It is the fastest way to make text big.
Sections with no headingTwo topics share one passage boundary.The prose still reads smoothly to a person.

What the scanner checks

Three rules cover the outline, and each one is a floor:

  • h1-single (3 points): exactly one non-empty H1. Zero H1s scores nothing; more than one is a partial pass worth 1 of the 3. Empty H1s are dropped before counting.
  • sections (3 points): at least four H2 elements. Two or three is a partial pass. The text is never read, so four H2s that all say "Overview" are four sections to this check.
  • landmarks (3 points): at least three of main, article, section, header, nav and footer appear as elements. ARIA roles do not count, so a page built from <div role="main"> scores nothing here however it reads to assistive technology.

There is a fourth, related rule — qa-headings (4 points) — which counts headings shaped like questions. It is a different question: not whether the outline is coherent, but whether it matches the way people ask.

The limits are the same as everywhere else in this scanner. The rules count elements and levels, not meaning. A page can pass all three with headings that are generic, duplicated or arranged around marketing sections rather than the reader's questions.

Reading your own outline

The useful test is to extract the headings and read them as a table of contents. If the list explains what the page covers, the outline is doing its job. If it reads like a sequence of campaign phrases, the passages underneath are harder to label.

# 1. The outline, in order
curl -sS https://your-domain.com/page/ \
  | grep -oE '<h[1-6][^>]*>[^<]*</h[1-6]>'

# 2. Count the levels
for level in 1 2 3 4 5 6; do
  printf 'h%s: ' "$level"
  curl -sS https://your-domain.com/page/ | grep -oE "<h${level}[ >]" | wc -l
done

# 3. Duplicate heading text (a signal of card titles or generic labels)
curl -sS https://your-domain.com/page/ \
  | grep -oE '<h[1-6][^>]*>[^<]*</h[1-6]>' | sort | uniq -d

Then read the list. Are the H2s the sections a reader would name? Does every H3 sit under an H2 that explains it? Are there headings that exist only because the template needed a slot? Those are the fixes that no counter will ask for.

A hierarchy that survives both readers

The pattern that works for extraction and for people is the same one: one page title, a handful of sections that answer a question or make a claim, subheadings only where a section genuinely splits, and the same wording a reader would use. It is also the pattern that works for screen readers, because a heading outline is how many assistive technologies navigate a document.

Two details are worth stating explicitly. First, headings inside repeated components are a trade: a card title as an H3 is accessible when the card is the unit of navigation, and noisy when the page is a list of thirty cards. Second, a heading is not a font size. If the text needs to be larger, style it; if it needs to be a section, head it.

What hierarchy buys, and what it does not

A clean outline buys boundaries and labels: a passage can be cut at the right place and named with the heading above it. It also buys accessibility and a page that a person can scan. What it does not buy is a citation, a ranking, or a guarantee that the section is worth quoting.

The structural rule from this series applies here too: the checks count the shapes, and the shapes are only as good as the content inside them.

Questions about heading hierarchy

Does heading hierarchy affect ranking?

It is a structural signal, not a ranking switch. What it does affect is how a page is cut into passages, how a screen reader navigates it, and whether a parser can tell which heading labels which block. Those matter for extraction; none of them guarantees a citation.

Can I have more than one H1?

HTML allows it; the scanner does not. Its h1-single rule gives full points for exactly one non-empty H1, a partial pass for several, and no points for none. The practical reason is that the H1 is the page's name; multiple names make the outline ambiguous.

Are card titles headings?

They can be, and on a list page they often are. The cost is that every card adds a heading to the document outline, so a page of twenty cards produces twenty headings that do not describe the page's sections. If the heading exists only to style a card, a non-heading element is usually the better choice.

Evidence and sources

GEO can boost visibility by up to 40% overall in generative engine responses, and in the paper's Table 1 the best of the tested methods improve on the no-optimization baseline by 41% and 28%. — Generative Engine Optimization, KDD 2024

Every figure in this piece comes from the published study or from the rule set the scanner executes; both are linked, and both can be re-run.

Primary sources

Alex Xu — Maintainer, LLMention

I build and maintain LLMention: the scanner, the rule set and the study behind it. The work is published as source, so the method can be checked rather than taken on trust.

How this site is written and funded →

Read next