# Heading Structure Checker

> Paste a page's HTML or Markdown and get its H1 to H6 outline with line numbers, plus checks for a missing H1, skipped levels and empty or duplicate headings.

- Page: https://codethatmoves.com/tools/seo/heading-checker/
- Site: Code That Moves
- Category: SEO and AI search
- Free, runs in the browser, nothing is uploaded
- Last checked: 2026-11-03

## What it does

- Indented H1 to H6 outline with level badges, line numbers and a click that selects the heading in the source, down to the tag itself in minified one-line HTML
- Reads HTML (page source or copied DOM) and Markdown (# headings, underlined Setext headings, raw <h1>–<h6> blocks and headings in quotes or lists), detected on its own or picked by hand; a README that opens with an HTML banner still reads as Markdown
- A Copy page HTML bookmarklet and a one-line DevTools console snippet for pages built with JavaScript, and an Open file button for .html and .md files
- Ignores script, style, template, noscript, comments, fenced code and front matter, so only real headings count
- Checks for a missing H1, several H1s, a first heading that is not the H1, skipped levels, empty, image-only, hidden, duplicate and very long headings
- Reads role="heading" with aria-level, aria-label, image alt text and SVG titles the way a screen reader would, and leaves hidden or role="presentation" headings out of the outline checks
- Shows the page <title> and meta description, and flags a missing title or a title with no H1
- Counts per level, copies the outline as indented text or as Markdown headings, and downloads it as CSV

## How to use it

1. Open the page in a browser, press Ctrl+U (Option+Command+U on a Mac) to see its source, select all and copy. If the page builds its content with JavaScript, click the Copy page HTML bookmarklet on that page, or run copy(document.documentElement.outerHTML) in the DevTools console.
2. Paste it into the box. The tool detects HTML or Markdown; use the toggle if it guesses wrong, for example on a Markdown file that starts with raw HTML.
3. Read the outline from top to bottom as a table of contents, then work through the checks. Click a line number to select that heading in the source.
4. Copy the outline as text for a report or as Markdown headings to plan a rewrite, or download it as CSV for an audit sheet.

## What it checks and why

Headings are the table of contents of a page. Screen reader users move through a page by its headings and often jump straight to the H1, so the WAI tutorials ask for headings that reflect the structure: one H1 for the main topic, H2 for the sections, H3 inside those, without skipping a level on the way down. Going back up, for example from H4 to H2 when a new section starts, is normal.

Search engines read headings too. Google's SEO starter guide suggests headings that help readers scan the page, and Google's John Mueller has said more than once that several H1s on a page are fine for Google Search. So this tool marks multiple H1s as a thing to check, not an error: the reason to keep one H1 is a clear outline for people, not a ranking rule. Skipped levels and empty headings matter for the same reason.

The checker reads the source the way a browser would without running it. It skips script, style, template and noscript blocks and comments, closes an unclosed heading where the HTML parser would, uses image alt text and SVG titles as heading text, follows aria-level and aria-label, and notes headings hidden with the hidden attribute, aria-hidden or an inline display: none. Hidden headings and headings with role="presentation" are not in the accessibility tree, so they stay in the outline but do not count for the H1, skip and duplicate checks. In Markdown it follows CommonMark: # to ###### headings, also inside block quotes and list items, text underlined with === or ---, and nothing inside fenced or indented code.

## Specs and sources

- [W3C WAI: Headings (Page Structure Tutorial)](https://www.w3.org/WAI/tutorials/page-structure/headings/)
- [WCAG 2.2: Understanding 1.3.1 Info and Relationships](https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships.html)
- [WHATWG HTML: Headings and outlines](https://html.spec.whatwg.org/multipage/sections.html#headings-and-outlines)
- [Google Search Central: SEO Starter Guide](https://developers.google.com/search/docs/fundamentals/seo-starter-guide)
- [MDN: The <h1> to <h6> HTML elements](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements)
- [Firefox Source Docs: Web Console helpers (copy)](https://firefox-source-docs.mozilla.org/devtools-user/web_console/helpers/)
- [CommonMark Spec: ATX and Setext headings](https://spec.commonmark.org/0.31.2/#atx-headings)

## Limits

- It cannot fetch a URL, because that would need a server. Paste the page source, or the rendered DOM for pages built with JavaScript.
- It reads markup, not styles from stylesheets: a heading hidden by a CSS class, or text that only looks like a heading, is not detected. Only inline style, hidden and aria-hidden count as hidden.
- Headings inside iframes, shadow DOM and template content are not part of the page outline here, and MDX components are not read. Raw HTML headings in Markdown are read only when the line starts with the <h1>–<h6> tag.
- Long and duplicate headings are hints, not errors. A repeated "Reviews" heading under two products can be right.

## Questions

### What are header tags (H1 to H6)?

Header tags is the common SEO name for the HTML heading elements <h1> to <h6>. H1 is the main heading of the page, H2 marks its sections and H3 to H6 the levels below. They are different from the <header> element, which wraps a page or section header such as the logo and navigation.

### Can a page have more than one H1?

Yes. HTML allows it and Google has said several H1s do not hurt a page in Search. One H1 that names the page is still the clearest outline for screen reader users, so most pages are better with one.

### Is it bad to skip heading levels?

Going down more than one level, such as H2 straight to H4, leaves a gap in the outline that screen reader users notice. It is not a ranking factor, but it is an accessibility issue the WAI tutorials ask you to avoid.

### Should the H1 be the same as the title tag?

They can match, and often nearly do. The title tag is written for the search result and the browser tab, the H1 for the reader on the page, so a slightly longer or plainer H1 is fine.

### How do I check the headings on a website?

Open the page, press Ctrl+U to view the source, copy it and paste it into this tool. For pages that render with JavaScript, use the Copy page HTML bookmarklet or run copy(document.documentElement.outerHTML) in the DevTools console, so you check what the visitor sees.

### Does the heading order matter for SEO?

Google uses headings to understand what a section is about, but there is no bonus for a perfect H1 to H6 order. A clear order matters most for readers and assistive technology, and it usually makes the page easier to scan.

### Can I use a logo image as the H1?

You can, and its alt text becomes the heading text. On most pages a text H1 that names the page topic is clearer than the site logo, which is the same on every page.
