Heading sizes in the right order

How the scan compares the shown size of H1 to H6 headings on desktop and phone, when a larger lower heading fails or warns, and how to fix it.

What AuditX checks

The scan opens the page twice, at 1440 by 900 pixels (desktop) and at 390 by 844 pixels (phone). In each view it records the shown font size of the headings H1 to H6, using the median size per level. Only visible headings with at least 20 characters of their own text count, so short headings such as Contact are not measured, and headings inside a cookie dialog or a video are skipped. A level is out of order when a deeper level (for example H3) is shown more than 1 pixel larger than a shallower one (for example H2). The check fails when this happens on desktop, and the message gives the first pair and how many more there are. It warns when the order is right on desktop but wrong on the phone. It passes when the sizes step down correctly. When fewer than two heading levels were found in both views, it is an info note, which does not lower the score. Equal sizes are allowed. The scan does not check the order of the heading levels in the HTML (for example a jump from H1 to H4), only the size you see. A fail counts fully in the review score and a warn counts less. This check is not one of the checks that can cap the overall score.

Why it matters

Nielsen Norman Group explains that visual hierarchy, using size and weight to show importance, guides the eye, and that visitors read larger text as more important.

W3C WCAG 2.2 success criterion 1.3.1 (Info and Relationships) says that structure shown by presentation, such as headings, should also be in the code. The W3C Web Accessibility Initiative advises that headings are chosen for structure and styled with CSS for size.

How to fix it

  1. Set the heading sizes in one place in your style sheet, with each level smaller than or equal to the one above.
  2. If a heading needs to look bigger or smaller for design reasons, change its style with a class. Do not pick another heading level for the look.
  3. On phones, scale the lower levels by the same factor as the H1, so a clamped H1 does not end up smaller than an H2.
  4. Check the page on a phone after the change.
h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.375rem; }

Does your site pass this check? A free scan runs it with every other check and shows the result in about a minute.

Scan my site

Sources

Related checks

Last reviewed 2026-11-13.