Heading elements are HTML code that help structure a web page. There are six levels of heading (<h1> to <h6>) and a list of conventions that should be followed when using them.
HTML's hierarchy of heading elements <h1> down to <h6> is intended to tell blind screen and Braille reader users, who cannot see the screen, what the structure of the page.
This helps them to understand how the content is organised and what parent section any piece of content belongs to.
Headings are the primary means of navigation through the page for many blind people. (They will also help search engines and so be good for SEO as well).
Like sighted users, who frequently scan the headings on a page to get a quick idea of what is discussed, and to pick out sections that interest them, screen and Braille readers can do the same for blind people by:
If the h1 to h6 heading elements are not used, or are used incorrectly, then screen and Braille readers cannot perceive them as headings. This means:
When choosing headings, there are some hard and fast rules that you should stick to to ensure your web pages work for screen and braille reader users.
This is like the title of a book and will be used by screen or braille reader users to discern if the page they have landed on is relevant to them.
A book with two titles would be confusing. Likewise, a page with two level 1 headings is confusing and users will be unsure what the primary purpose of the page is.
Subheadings under the main heading should be <h2> elements; subheadings under an <h2> should be <h3> and so on down to <h6>. Skipping headings can be confusing for users as it may not be clear which content nests under which headings. Some users may also fail to surface content at lower heading levels as they will be unaware it exists.
Headings are often chosen based on how they look, rather than their position in the hierarchy. While this may look good for sighted users, it completely undermines the purpose of the heading structure. Instead, choose the correct heading level and change the way it looks with styling and CSS. If you want to emphasise content that is not a heading, use bold, italics or change the font size manually.
In contrast to the previous point, when styling your page, if you insert a visual heading, make sure it is also associated with a heading element. If you don’t, it will not be announced by assistive technologies and be of no use to blind users.
Headings are a crucial aspect of accessibility that many websites fall down on. Once you’ve got your head around headings, they are very straightforward and, compared to some accessibility issues, relatively easy to fix. Ensure both your development and content team are up to speed on heading best practice to ensure any updates to your website are accessible.
WebAIM Semantic Structure – Headings
UK Government accessibility requirements
WCAG 2.1: Common accessibility fails