Skip to content
Koit Academy

Websites & SEO

·

5 min read

How to Use Heading Tags (H1 to H6) Properly

How to use H1 to H6 heading tags for readers, accessibility and SEO, when skipping a level is fine, how many H1s to use, and how to check a page's outline.

By Koit Academy

Headings are the outline of a page. In HTML they run from <h1>, the most important, to <h6>, the least, and they do two jobs at once: they help readers scan to the part they want, and they tell browsers, screen readers and search engines how the content is organised. Most heading advice online is about SEO, and much of it is stricter than it needs to be. The rules that matter come from accessibility, and they are simple.

What heading ranks mean

The W3C’s Web Accessibility Initiative puts it plainly: the most important heading has rank 1, <h1>, and the least important rank 6, <h6>. Headings nest by rank. An <h3> after an <h2> starts a subsection of that <h2> section; the next <h2> starts a new section.

A typical article looks like this:

  • <h1> the page’s main topic
    • <h2> first section
      • <h3> a part of the first section
      • <h3> another part
    • <h2> second section
    • <h2> third section

The one rule about order

The WAI tutorial says that skipping heading ranks can be confusing and should be avoided where possible: an <h2> should not be followed directly by an <h4>. It also says it is fine to skip ranks when closing subsections: an <h4> can be followed by an <h2> that starts a new section.

So the test is only for steps down. Going from <h2> to <h3> is correct; from <h2> to <h4> skips a level; from <h4> back up to <h2> is normal.

The heading structure checker reads the headings out of pasted HTML in order, prints them as an indented outline and flags any step down of more than one level.

Headings are not styles

The most common mistake is choosing a heading level for its size. A small grey line under a title is not an <h4> because it looks small; if it is not the start of a section, it is not a heading at all. Use CSS for the look and heading tags for structure. The reverse mistake is just as common: a section title made bold or large with CSS, but not marked up as a heading, which screen readers and search engines cannot see as a section.

How many H1s?

The WAI tutorial describes the rank 1 heading as the page’s main content heading, not the site name, and pages usually have one. HTML allows more than one, but one <h1> naming the page’s topic is the clearest structure for readers and the easiest to maintain. A logo or site name in the header does not need to be an <h1>.

What Google says about headings

Google’s SEO starter guide notes that, from a Google Search perspective, it does not matter if headings are used out of order. So fixing heading order is not a ranking lever in itself. Google’s Gary Illyes has also warned that a non-Google tool calling something good or bad does not make it relevant for Google.

That does not make structure unimportant. A clear outline helps people find what they came for, which keeps them on the page, and it is essential for people using screen readers, who often jump from heading to heading to navigate.

Writing good headings

  • Say what the section is about. “Costs in 2026” beats “More information”.
  • Keep them short enough to scan.
  • Use the words readers would use, which are usually also the words they search with.
  • Make each one make sense alone, since many readers only scan the headings.
  • Do not stuff keywords. A heading written for a search engine rather than a reader helps neither.

The H1 and the title tag

The <h1> is the heading on the page; the title tag is the title shown in the browser tab and often in search results. They can be the same or differ. Many sites write a shorter, punchier title tag and a fuller <h1>. The SERP preview tool shows how a title and description would look in results, and our guide on how to write a title tag covers the length limits.

How long sections should be

There is no fixed rule, but very long sections without a subheading are hard to scan, and very short ones fragment the page. Many writers aim for a heading every few hundred words. The word counter shows the length of a draft so you can see where breaks are needed.

Checking a page

  1. Open the page source or your editor’s HTML view.
  2. Paste it into a heading checker, or use a browser accessibility extension.
  3. Read the outline on its own. It should make sense as a table of contents.
  4. Fix skipped levels on the way down and any headings used only for styling.

A checker that reads the HTML as text sees the headings in the source. Headings added later by JavaScript will not appear in it.

Common questions

Do heading tags help SEO? They help readers understand and navigate a page, and Google has said their order does not matter for Search. Use them for structure, and write them for readers.

Can I skip from H2 to H4? It should be avoided where possible, because it can confuse readers using assistive technology. Going back up, from H4 to H2, is fine.

Should the H1 include my main keyword? If it describes the page well, it usually will. Write it for the reader first.

Can a page have no H1? It can, but a page without a main heading is harder to understand. Most pages should have one.

Limits of this guide

This covers HTML headings in ordinary web pages. Content management systems and page builders sometimes add headings of their own, so check the published page, not only the editor.

Sources, read November 15, 2026:

  • W3C Web Accessibility Initiative, Headings: heading ranks, avoiding skipped ranks, and skipping ranks when closing subsections.
  • Search Engine Journal, Google clarifies H1-H6 headings for SEO: Google’s starter guide on heading order and Gary Illyes on third-party tools.