Back to “Technical SEO basics”
Technical SEO basics4 min read

Heading tags (H1, H2, H3)

A clean heading hierarchy, a single H1, and H2s phrased as questions: what helps an engine and an AI understand your page.

Heading tags (H1, H2, H3...) give the engine and the AI a hierarchical outline of your content, independent of its visual styling. A clean hierarchy makes the page easier to understand as a whole and easier to split into usable chunks.

Correct semantic hierarchy

Heading tags form a logical tree: the H1 is the page's main title, the H2s are its main sections, the H3s are subsections of those H2s, and so on. This isn't a styling tool (making text bigger) — it's a tool for structuring meaning.

<h1>Complete Guide to E-Invoicing</h1>
  <h2>Why e-invoicing is becoming mandatory</h2>
  <h2>Accepted file formats</h2>
    <h3>Factur-X format</h3>
    <h3>UBL format</h3>
  <h2>How to choose a dematerialization platform</h2>

Skipping a level (jumping from an H1 straight to an H3, for instance) breaks this logic and makes it harder for a machine to understand at what level of detail a given passage sits.

One H1 per page

The simplest rule to remember: a page should have a single H1, summarizing the page's central topic — generally close to, but not necessarily identical to, the content of the title tag. Multiple H1s on the same page (common with certain themes or visual builders, or with layout components reused without much thought) dilute the signal about the main topic.

The H1 and the title can differ slightly in wording: the title is often optimized for display in search results (including the brand name, for instance), while the H1 can focus purely on the topic, without a brand element. This difference is normal and not a problem, as long as both texts clearly describe the same central topic without contradicting each other.

Structuring headings as questions to ease chunking

An LLM splits a page's content into blocks (chunks) to index it or extract an answer from it — a mechanism covered in the lesson on chunking. Phrasing your H2s and H3s as concrete questions increases the odds that a whole block can autonomously answer a user query, without depending on the context of neighboring paragraphs.

Before: Benefits After: What are the benefits of e-invoicing for a small business?

Before: Implementation After: How to set up e-invoicing in 3 steps?

An H2 phrased as a question, followed by a direct answer in the first sentences of the paragraph, matches exactly the format an AI looks to extract when building its own answer. This logic doesn't apply uniformly to every H2 on a page: an article's outline can legitimately mix declarative headings ("Definition and stakes") with interrogative ones ("How much does setup cost?"), as long as each section, taken in isolation, remains understandable without depending on the previous paragraph.

Common mistakes

  • Using headings purely for their visual rendering (picking an <h3> because it "looks the right size"), ignoring the logical hierarchy.
  • Putting the company name or a tagline in the H1 instead of the page's actual topic.
  • Multiplying heading levels on short content, needlessly fragmenting the information and hurting overall readability.
  • Letting a theme or plugin auto-generate empty or redundant H2s (e.g. "Summary", "Introduction" with no real content underneath).
  • Phrasing two nearly identical H2s on the same page ("Our advantages" and "Our strengths"), which blurs the distinction between sections for an automated reader.
  • Artificially stuffing keywords into headings at the expense of readability for a human reader — the structuring logic should never override the clarity of the sentence.

Checking the hierarchy of your pages

A quick pass through the browser inspector (or a tool listing a page's heading tags) is enough to spot inconsistencies: multiple H1s, skipped levels, or empty headings. Fixing this structure usually requires no visual change if your CSS is already decoupled from the semantic HTML — see the lesson on semantic HTML5 to go further on that decoupling.

The length and content of a good H2

An overly short H2 ("Benefits", "FAQ", "Pricing") works as a visual landmark for a human scanning the page, but conveys little information to a machine that has to judge, without context, the relevance of the block that follows. Conversely, an overly long H2 (a full 20-word sentence) loses readability and scannability for the human reader. The recommended balance generally sits between 5 and 12 words — enough to state a full question or claim, without becoming a disguised paragraph.

Another useful habit: reread only the list of your H2s and H3s, without the body text, the way a tool building an automatic table of contents would. If that list alone lets you guess the page's content with reasonable accuracy, the hierarchy is doing its job. If it's just a string of vague words, that's a sign it needs reworking.