Heading tags (also called header tags or H tags) are a semantic tool for providing structure to web content. If you’ve researched search engine optimization (SEO) or reviewed the Web Content Accessibility Guidelines (WCAG), you’ve probably read about the importance of heading tags.
Nevertheless, these HTML elements are often used incorrectly, which can create significant accessibility issues. Here’s why: Many people use headings to scan long-form web content for information. You probably do this, too — after reading this introduction, you might read through a few of the headings below to determine whether you’re making any mistakes with your tags.
When heading tags are misused, some users may be unable to use them for their intended purpose. That’s especially true for people who use screen readers and other assistive technologies. To provide your users with the best possible experience, review your header tags regularly — and make sure you’re not making one of these common mistakes.
Heading tags should follow a standard sequential order:
To put this another way, headings and subheadings function like the sections of a college essay. The H1 is the most important tag, while the H6 is the least important. The order of the tags is extremely important because real-life users expect header tags to follow a consistent, logical order. If the headings are out of order, a user might assume that they’ve missed important information.
Don’t choose a subheading tag simply because it looks great on your page — some users can’t perceive content visually, and heading tags can be styled with CSS to achieve any desired aesthetic.
Read: Why Headings Aren't Simply Style Elements
Your heading tags should incorporate relevant keywords that explain the purpose of your content. A vague heading like “More Info" doesn’t give enough context — “Read More About Our Plumbing Services" would be much more effective.
Remember, header tags are powerful SEO signals. Search engines will look for keywords in your headings, and sites that write descriptive tags may see more organic traffic. Most search engines give more preference to primary headings, so your H1 tags are especially important for SEO, while subheadings like H5 and H6 are less important. That’s another great reason to use your tags in logical order.
With that said, your primary goal is to write your headings for real users, not search engines. When writing, ask yourself whether your headings provide enough context to allow a user to find the information they need.
Read: How Headings Help People with Disabilities Navigate a Website
A person with vision disabilities may use a screen reader to scan through headings. The screen reader will read each tag in its entirety before moving on to the next; while the user can pause the audio and skip to the next tag, extremely long subheadings can negatively affect their on-page experience.
Many content creators recognize the importance of header tags for SEO, so they try to add as many keywords as possible to their headings. This can make your page look messy, especially when users magnify their screens — an important consideration for digital accessibility. Keep your heading tags concise and descriptive.
Read: Writing Clearer Content That Benefits Accessibility Expands Your Audience
Every page should contain an H1 tag, and most pages will contain H2s. On longer blogs, H3s can help to break up content, but lower-level header tags are rarely necessary. Using more headings won’t always improve your page’s structure, and they can make your page less useful for some people with disabilities.
Heading tags can help to break up longform content into easily digestible sections, but other tools may be preferable. Consider adding unordered or ordered lists to your content. Media can also help to break up longer pages (as long as you provide text alternatives for any non-text content).
Read: Tips for Making HTML Lists Accessible
Page organization is crucial for accessibility. Well-written subheadings can improve the browsing experience for people with vision, mobility, and neurocognitive disabilities — along with users who don’t have disabilities that affect their browsing habits.
When writing header tags, ask yourself these questions:
Content optimization can expand your site’s audience and improve user retention, so audit your subheadings regularly. For more web accessibility tips, download The Ultimate Guide to Web Accessibility, our free 29-page guide to accessible design.