What are Header Tags?
HTML header tags are used to differentiate the headings (h1) and sub-headings (h2-h6) of a page from the rest of the content. These tags are also known to webmasters as heading tags or simply header tags.
The most important heading tag is the h1 tag and least important is the h6 tag. In HTML coding, the heading tags from h1 to h6 form a top-down hierarchy. This means that if you skip any of the tag numbers the heading structure will be broken, which is not ideal for on-page SEO.
For example, if your site is introduced with an h1 tag followed by an h3 tag, the hierarchy will be broken, meaning the heading structure is not as SEO-friendly. This doesn't apply, however, to the bottom-up structure, which could jump from an h4 to an h2 without issue.
Ideally, every page should have an h1 tag, but no more than one (unless you’re using HTML5 — more on that below).
What are HTML Header Tags in SEO?
We do use H tags to understand the structure of the text on a page better.
- John Mueller, Google
For SEO, there are 2 main purposes for HTML header tags:
- Structuring the page for readability
- Relevance to keywords
1. Make the page more readable
Adding sections and subsections, with appropriate headers, divides content into scannable blocks that are much easier to consume. For both humans and bots.
Look at your page’s HTML header tags as a way of creating an outline or sketch of your article, using body content to fill in details and examples.
In fact, you can look at the HTML headers in this article as an example. Here are the headers for this article:
<h1>What are Header Tags?</h1> <h2>What are HTML Header Tags in SEO?</h2> <h3>1. Make the page more readable</h3> <h3>2. Make the page more relevant</h3> <h2>How to Write HTML Headers for SEO</h2> <h2>Things You Should Not Be Doing with HTML Headers</h2>
This translates directly to a traditional outline for this article:
- What are Header Tags?
- What are HTML Header Tags in SEO?
- Make the page more readable
- Make the page more relevant
- How to Write HTML Headers for SEO
- What are HTML Header Tags in SEO?
Things You Should Not Be Doing with HTML Headers
2. Make the page more relevant
Google sees the text used within the HTML header tags as more valuable, or a higher priority, than the rest of the text on a page. Therefore, words used in the header tags are weighted more highly when Google is trying to figure out if a page is relevant to a user’s query. In fact, a page’s h1 tag is one of the most important places to use a keyword.
For example, if the keyword you want to target is “on page SEO”, you would use that in your h1 tags, and topically related words in your outline:
- On page SEO: The Ultimate Guide
- What is On Page SEO?
- What are On Page Ranking Factors?
- Best On Page SEO Techniques
- XML Sitemap
- HTML Headers
- On page keywords
- Best On Page SEO Tools
- Bonus: Off Page SEO
Use a keyword research tool that includes LSI keywords to help you craft your pages’ HTML headers.
This isn’t a case for keyword stuffing. Thanks to the semantic web and LSI keywords, it’s better to use related words that reinforce the relevance, quality and depth of a piece of content to a user’s query.
How to Write HTML Headers for SEO
The way you write your headers and subheads depends on which HTML header tag you’re talking about.
- Put the h1 tags at the top of your page (of course).
- Use the words people would use when searching for what your content is about.
- If you’re targeting a question, put the question in the h1 tag.
- If you’re writing a how-to guide, put each step in an h2 tag.
- For non-how-to articles, use LSI keywords and other, semantically-related words in your h2-h6 tags. This helps reinforce topical relevance and removes ambiguity.
Those third and fourth points are very important when trying to claim one of Google’s featured snippets for your site. Featured snippets rely on Google’s ability to determine what page best answers a question. Structuring your content to make it more readable is a big part of that.
Using HTML headers to target search intent
Your header content plays a role in matching your content to a searcher's goal, beyond simple keyword rankings.
Since search engines want to deliver pages that meet their user’s need, and so they will rely on HTML header tags to help determine if a page answers the searcher’s question.
Use your HTML headers to help target these types of queries:
"What is”: Since you are targeting the question, you’ll want to use it in the
<h1>tag. Keep the answer to the question next to the
<h1>tag to help Google find it more easily.
“How to”: When targeting people trying to follow directions, put each step in the process as a separate HTML header. That can be an
<h3>if the how-to is part of a much larger article, or as
<h2>tags if the instructions is the main point of the content.
Commercial intent: We covered product and category pages earlier. You can also use
<h1>tags to target commercial intent searches with special offers such as discounts or add-ons. Just include the offer in the header content.
Using HTML headers in HTML5
While pages using HTML4 or older should stick to the 1
<h1> tag per page rule, those using HTML5 can, in fact, use multiple header tags. This works because HTML5 supports the
<article> tag. This tag allows you, essentially, to break a page up into multiple “articles”, each with its own
So, for example, an article on a old school HTML page would look like this:
<h1>How to Do SEO</h1> <h2>Step 1: Technical SEO</h2> <p>Detailed explanation of.</p> <h2>Step 2: On-Page SEO</h2> <p>Detailed Explanation of step 2.</p>
However, with HTML5, that page could look like this:
<header><h1>How to do SEO</h1></header> <article> <h1>Step 1: Technical SEO</h1> <p>Detailed explanation.</p> </article> <article> <h1>Step 2: On-Page SEO</h1> <p>Detailed explanation</p> </article>
Now the section headers can be given their proper importance on the page, but within the context of the overall article.
However, please note that this can be a bit tricky and complicated to actually implement on a page. So if you are unsure of your codings skills, or not sure if your page uses HTML5, stick to the one header per page rule
Things you should not be doing with heading tags
Do not stuff your heading tags with keywords.
Do not use more than one h1 tag on a page. Usually, pages will have a single h1 heading and including two might make search engines think this as an attempt to include more keywords for SEO in multiple h1 tags. It is better to divide the content into two separate topics on individual pages with their own h1 tags. This makes more sense to both readers and the search engine spiders, however, using multiple h1 tags is allowed.
Do not use heading tags as hidden text. Any hidden text can result in penalties for your site, especially if the hidden part is a component that affects SEO.
Do not repeat heading tags on different pages of your site. It is a good practice to have unique heading tags throughout your site. Avoid using identical content for both your page’s h1 tag and meta title tag.
Do not use heading tags for styling text but use them for presenting organized and structured content on pages. Use CSS stylesheets for the purpose of styling.