Header tags are used to give a page or a section of a page a heading. They are used for headlines and subtitles. They shouldn't be confused for title tags, which are for browser tabs and search results. Headers are displayed in the content of the page itself. Follow these best practices to get the most search engine attention out of your headers.
Include Keywords In Heading Tags
John Mueller has directly confirmed that the content within heading tags is a ranking factor:
So headings on a page help us to better understand the content on the page.
Headings on the page are not the only ranking factor that we have.
We look at the content on its own as well.
But sometimes having a clear heading on a page gives us a little bit more information on what that section is about.
To make it clear that your page, or a subsection of it, is about a specific keyword, make sure to include the keyword within the heading tag. Obviously, you should do this in a way that is also helpful for users in navigating, skimming, and understanding the content of the page.
Use Subheading Tags: H1, H2, H3...
John Mueller's quote above makes it abundantly clear that specific sections of a page can be analyzed individually and that heading tags can be used to better understand what those sections are about. He goes on to make this even more clear:
And when it comes to text on a page, a heading is a really strong signal telling us this part of the page is about this topic.
...whether you put that into an H1 tag or an H2 tag or H5 or whatever, that doesn't matter so much.
But rather kind of this general signal that you give us that says... this part of the page is about this topic. And this other part of the page is maybe about a different topic.
So that's generally what I would think about there.
Unless your page is very short, this means you should almost always be using subheadings to address longer tail keywords and potential queries that users might be searching for.
Images Get Header Tags If They Are Important
Mueller also had this to say about the relationship between header tags and images:
So in particular when it comes to images, that's something where headings and the context of that image helps us a lot to understand where we should be showing that image in search.
...images are not text. We don't automatically know what we should be showing it for.
And that combination of the image plus the landing page is something that depends quite a bit on the text of the page.
This shouldn't be taken to mean that every image you post should get a header tag. However, if you are going to share an image that elucidates something important and makes up an important part of your content, it should get its own subheading, preferably followed by some text discussing the image in a way that helps users.
Rank Heading Tags Appropriately
While Mueller suggests that specific heading tags aren't so important, using HTML standards as they were intended should always be considered a best practice. It is plausible this helps Google understand the page structure more clearly, and it certainly suggests how the document should be structured and interpreted to an algorithm that sees it.
Header tags follow a ranked hierarchy, with H1 tags intended as a headline for the main body content of the entire page, H2 tags intended as a subheading for a section of the page, H3 tags intended for a subsection within a subsection, H4 for a subsection within a subsection within a subsection, and so on.
Generally, going deeper than H3 gets confusing enough for users that it's unlikely to be particularly useful for search engines either. The number of the heading tag indicates how deeply that section is "nested" within the structure of the page. They can be thought of similarly to alphabetical lists nested within numbered lists:
<h1>This Is A Heading For The Entire Page</h1> <h2>1. This is the first subsection of the page</h2> <h3>a. This is a subsection within the first subsection of the page</h3> <h3>b. This is a second subsection within the first subsection of the page</h3> <h2>2. This is the second subsection of the page</h2>
Use Keywords Earlier In The Heading
It's a generally accepted best practice in the SEO industry to use keywords earlier in a heading tag rather than later. Users tend to pay more attention to the first few words of a subheading than the rest, so it's plausible to assume search engines will mirror this behavior. Do not do this in a way that makes headings less readable to users or that makes the heading clunky.
Consider the way we titled this page, which is also the H1 for the page:
<h1>Header Tags: Best Practices For SEO</h1>
The order of importance here is "header tags" followed by "best practices" followed by "SEO." Generally, the more specific keywords should be used closer to the beginning and the more general ones closer to the end. But notice that we've also punctuated and written this in a way that makes it useful for users. If we were strictly organizing keyword content by importance without regard for users, it would look more like this:
<h1>Header Tags Best Practices SEO</h1>
Tagging like this is clunky, hard to read, and not very useful for users. It should be avoided.
No Keyword Stuffing In Header Tags
Keyword stuffing is when web standards are abused by forcing keywords into content or tags in a way that isn't helpful to users. We discussed readability in the previous section. Keyword stuffing usually takes things in an even worse direction, such as by using various keyword synonyms or misspellings:
<h2>keywords, key words, key word, keyword</h2>
Another form of keyword stuffing is using various keywords you are trying to target in an unhelpful way:
<h1>keywords for ranking, seo, better rankings, search engine visibility, keyword clickthrough rate</h1>
In this example, even though all of these keywords are related and it might make sense to target all of them in one document, stuffing them all in the header doesn't make things clear for users and frankly could make the page harder for search engines to understand, even setting possible spam penalties aside.
The ideal way to target multiple keywords is to use them in separate headings throughout the document, preferably organized from most to least important by the order they appear in and the header rank:
<h1>Keywords For Ranking In SEO</h1> <h2>Better Rankings: What That Means</h2> <h3>Keyword Click Through Rate's Importance</h3> <h2>Search Engine Visibility, Not Quite The Same Thing</h2>
These best practices will help search engines better understand your pages and send more useful traffic through the proper use of headings. Save this post and refer back to it to make sure your headers are up to par.