Heading Order Checker

Paste HTML and visualise the heading hierarchy with skipped-level warnings.

Ad placeholder (leaderboard)

The Heading Order Checker reads the h1h6 elements out of any HTML you paste and shows them as an indented outline so you can immediately see whether your document is structured logically. Well-nested headings are the backbone of an accessible page: screen-reader users jump from heading to heading to skim content, and a broken hierarchy makes that navigation confusing.

How it works

The tool parses your HTML with the browser’s built-in DOMParser and walks every heading element in document order. For each heading it records its level (1–6) and its text. It then compares each heading’s level to the previous one:

  • If the level increases by more than one (for example h2 directly to h4), that is a skipped level and gets flagged.
  • If the level decreases or increases by exactly one, the structure is valid.

It also counts the number of h1 elements: zero h1 (no page title) and more than one h1 are both surfaced as warnings, because each can confuse assistive technology.

This mirrors WCAG 2.1 SC 1.3.1, which requires the structure you convey visually to also be exposed programmatically.

Example

Given this fragment:

<h1>Annual Report</h1>
<h2>Finances</h2>
<h4>Q1 Revenue</h4>

The jump from h2 to h4 skips h3, so the checker marks the Q1 Revenue heading as a skipped level. The fix is to either change it to an h3, or insert an intermediate h3 section heading above it.

Tips

  • Run the checker on a component’s rendered HTML, not your source template, so dynamically inserted headings are included.
  • A long run of same-level headings is fine — only the transitions between levels matter for this check.
  • Pair this with a link-text and table-header review for a fuller accessibility pass before publishing.
Ad placeholder (rectangle)