UI Inspector

H1-H6 Headings and SEO: everything you need to know

What are headings?

Headings are phrases at the beginning of a section that explain what it's about. Correct use of headings on a page provides hierarchy and overview, and helps quickly communicate what a web page is about. They help visitors quickly scan a page, and they help search engines quickly understand a page's structure and what it's about.

Headings come in six levels: H1 through H6, of which headings H1, H2 and H3 are most frequently used. Headings are defined in a page's HTML.

The H1 heading is often referred to as the "main heading", while H2-H6 headings are referred to as "subheadings" because they indicate sub-levels.

What about heading tags?

People often refer to "heading tags" when talking about headings.

To avoid any confusion, let's take an example and look at the H1 heading element as it appears in the HTML source: <h1>This is the H1 heading</h1>:

  • <h1>: opening tag for the H1 heading
  • This is the H1 heading: the text that'll appear on a visitor's screen as the H1 heading.
  • </h1>: closing tag for the H1 heading

Why use headings?

Headings are useful for both visitors and search engines:

  • Visitors use headings to quickly scan a page to determine whether it looks relevant for them. What's more, visually impaired visitors use screen readers to browse the web. And screenreaders rely on headings to "understand" web pages, and help their users to navigate.

  • Search engines use headings to understand a page's structure and what topics it's about. While only a small factor in search engines' ranking algorithms, including keywords in headings does contribute to improved SEO performance. Even if you're not on board with the idea that headings make for a small ranking factor, keep in mind that everything you do to improve the user experience generally translates to better SEO performance.

H2-H6 subheadings

Subheadings H2-H6 are used to further structure the content.

Most pages benefit from having at least one H2 heading, but if it doesn't make sense for visitors to include one then you can leave it out.

Use H2-H6 subheadings where it makes sense, and keep in mind not to skip heading levels.

Take Your Test Automation to the Next Level!