On-page

Heading tags and the H1: structure readers can scan

6 min readUpdated

Heading tags are the HTML elements <h1> to <h6> that give a page its outline, from the main title down. MDN's reference says a page "should generally have a single <h1> element that describes the content of the page," and that levels should not be skipped. They are the first of the on-page signals a reader actually sees.

What heading tags are

Heading tags mark the sections of a document and their rank. The <h1> is the top level, usually the page's main title; <h2> marks the sections beneath it, <h3> the parts of those sections, and so on down to <h6>.

They describe structure, not style. A heading can be made large or small with CSS, and text can be made to look like a heading without being one. What the tag says is that this line titles the content that follows, at this level of the outline. Screen readers let their users jump from heading to heading; search engines read the same outline to understand how the page is organised.

One H1 per page

A page should generally have one H1. MDN, in its reference for heading elements last modified on and checked on , puts it this way: "While using multiple <h1> elements on one page is allowed by the HTML standard (as long as they are not nested), this is not considered a best practice."

The reason is clarity. A single H1 names the page, much as the title tag does, and every other heading sits under it. Two or three H1s leave a reader, and a program, to guess which one is the page's real title. Google names the same problem among its reasons for rewriting a title link: "No clear main title," when several headings carry the same weight.

Do not skip levels

Headings should go down one level at a time. MDN: "Do not skip heading levels: always start from <h1>, followed by <h2> and so on." A section under an H2 is an H3, not an H4 chosen because it looks the right size.

Skipped levels break the outline that screen reader users navigate by: a jump from H2 to H4 suggests a missing section that is not there. The fix is to choose the level by position in the outline and set the size in CSS.

The H1 and the title tag

The H1 and the title tag are different elements with different readers. The title tag sits in the <head> and appears in search results, browser tabs and bookmarks; the H1 is the visible heading on the page itself. They often carry the same words, and that agreement helps.

Google uses the H1 as one of its sources for a result's title link. Its documentation lists "Heading elements, such as <h1> elements" among them, and advises making the main title stand out, for example by "putting the title text in the first visible <h1> element on the page." When the title tag and the H1 agree, Google has fewer reasons to build a title of its own.

What Google says about headings

Google's advice on headings is about readers. Its SEO Starter Guide, last updated on , lists among the qualities of useful content that you "break up long content into paragraphs and sections, and provide headings to help users navigate your pages."

Google does not publish a rule about how many headings a page needs or which words they must contain. A heading earns its place by telling the reader what the next section says; one written to repeat a phrase for a search engine tells the reader nothing new.

Writing headings that work

  • Say what the section answers

    A heading phrased the way a reader would ask the question lets them find the section, and lets a system match the section to the question. That is the point of AEO as well.

  • Answer in the first sentence below it

    A heading promises a section; the sentence after it should keep the promise at once, so the section still makes sense when read on its own.

  • Keep them short and specific

    "Pricing" tells less than "What each plan includes"; a heading longer than a line has usually become a sentence.

  • Use them for structure only

    A heading for a single line of emphasis, or a styled paragraph standing in for a heading, both break the outline. Emphasis has its own elements, and a visual heading needs the real tag underneath it to count as one.

Checking a page's outline

The outline can be read without any tool: view the page source and list the heading tags in order, or use the browser's accessibility view, which shows the headings as a tree. Look for exactly one H1, levels that go down one step at a time, and headings that make sense read on their own, without the text beneath them. Templates are the usual source of trouble, for example a theme that renders the site name or the logo as the page's H1. A check of one page of each type, an article, a category and the home page, usually finds a template fault faster than reading pages one by one.

FAQ

How many H1 tags should a page have?

One, as a rule. The HTML standard allows several when they are not nested, but MDN describes multiple H1s as "not considered a best practice," and a single H1 makes the page's main title clear to readers and to search engines. The other sections belong under it as H2s.

Do heading tags affect SEO?

Google's guidance treats headings as a way to "help users navigate your pages," and it reads the H1 as one of the sources for a result's title link. It does not publish a weight for headings. Clear, honest headings help readers and search engines understand the page in the same way.

What is the difference between the H1 and the title tag?

The title tag lives in the page's head and appears in search results, browser tabs and bookmarks. The H1 is the main heading visible on the page. They often share words, and Google uses the H1 as an alternative source for the title link, so keeping them in agreement helps.

Can I skip heading levels?

You should not. MDN advises starting from <h1>, then <h2> and so on without skipping. A jump from H2 to H4 suggests a missing section to anyone navigating by headings, including screen reader users. Choose the level by position in the outline and set the visual size in CSS.