Are all headings marked in the correct heading tag?

Goal

Ensure that our content uses explicit semantic headings, not text styled to look like headings, so they are understandable for users, assistive technology, and other machine uses.

Note!
Every page should have an <h1> at the top containing the page title. The presence of additional headings depends on the page content.

Why this matters

Read Why does it matter if our HTML is semantic?.

How to implement

For the proper structure of a heading, see MDN’s site:

How to test

Manual testing

  1. Right-click the heading and ensure it’s wrapped in the appropriate (semantic) heading tags.

Automated testing

We can’t automate testing for “block of text might need to be in a paragraph” because computers can’t read to discern whether the context is correct.

We can automate whether the heading tags validate.