A header tag is a piece of HTML coding used on a web page. The text of a header tag appears on the web page as the page title (an h1 tag) or as a subtitle (h2 through h6 tags).
The web design function of creating page titles and subheads using header tags (rather than, say, putting headers in bold or in italic text) is formatting. Using h1-h6 tags makes an h5 tag appear visually more significant than an h6 tag, an h4 tag more significant than an h5 tag, and so forth. Moreover, using these tags sitewide makes the textual formatting of pages consistent across your entire site, a big plus for the user experience. You can see standard formatting for header tags here.
Web pages need not use all six styles of header tags. In fact, web pages typically use only h1, h2 and sometimes h3 tags, since the hierarchy of text importance — that is, the complexity of the text — doesn’t go any deeper than three levels down.
For SEO and user experience reasons, a web page should use only one h1 tag — a page with two main titles would confuse Google crawlers and human readers. H2 through h6 tags can be used as many times as necessary on the page.
What Is an h1 tag?
The h1 tag is formatted as the main title of a web page. H2 through h6 tags are generally called subheads or subtitles. The h1 tag of this article is “What Are H1 And Header Tags, And Why Are They Needed For SEO?”
The Header Tag and SEO
Header tags have significance in SEO campaigns, particularly the h1 tag. Google crawlers pay a good deal of attention to the h1 tag because, being the main title of the page, it conveys (or should convey) the essence of what that page is about. A well-composed h1 tag helps Google match your content with relevant searches, thus lifting it in the organic rankings.
Lower-level header tags are thought to have some SEO significance as well, but in all likelihood much less than in the past.
Header Tags and Title Tags
Sometimes you will hear people use the terms “header tag” and “title tag” interchangeably, as if they were the same thing. This is not the case. A header tag, as just discussed, formats text into visual, on-page headings. A title tag is another piece of HTML coding. The title tag, similar to the h1 tag, should also convey the essence of a web page’s content. However, the title tag’s text does not appear on the page, but rather in the browser bar, on Google SERPs (search engine results pages) and often in social media shares.
The title tag has more SEO importance than the h1 tag. The title tag and h1 tag of a page could be the same, or they could be different.
H1 tags and SEO Keywords
Header tags (and title tags) should incorporate primary keywords, especially for target SEO pages on the website.
What should not be done is “keyword stuffing” — an attempt to pack a whole bunch of keywords into the title. Keyword stuffing is a spammy practice that Google perceives as a negative. In addition, keyword stuffing tends to annoy or confuse readers, making them less likely to read or act on your website content.
Sometimes, if a page has two primary keywords (for example, “blue widgets” and “stainless steel widgets”) the SEO campaign will be best served by using one keyword as the title tag and the other as the h1 tag. Both of these HTML tags can be changed quite easily, making tests easy to employ.
How to Write Header Tags
Testing is also conducted on header tags for purposes outside SEO, particularly in the area of conversion optimization. Changing the text of header tags could improve a page’s click-throughs, form submissions or order placements.
Header tags are very useful to readers because they facilitate the scanning of a web page, and give readers a sense of a page’s major ideas and relative importance. Important writing tips for header tags:
- When SEO is involved, the challenge is to balance a header tag’s persuasive/informational purpose with keyword insertion. You don’t want the keywords to make your h1 tags stilted, spammy, confusing or redundant.
- Keep h1 tags to about 60 characters or less in length — anything longer may not display in one line on a web page.
- Use a unique h1 tag on each page of your website. Using the same one two or more times could lead Google crawlers to interpret the affected pages as being duplicate content and therefore not display those pages in SERPs for relevant searches.
- Review the formatting of your header tags to make sure their designs convey a hierarchy of importance. If, for instance, an h2 tag looks bigger and bolder than an h1 tag, the default formatting should be changed to create the opposite effect.
- Adding secondary keywords to h2 through h6 tags doesn’t hurt — those tags suggest to Google crawlers that their content is more important than plain body text. Often, secondary keywords naturally fit into subheads because those keywords represent niche features/benefits/attributes of your product and service (for example, “widgets on sale”, “widget service contracts”, “return policy for widgets”).
- When in doubt, the needs of the human reader take precedence over keywords in header tag composition. Remember that the goal of SEO is not merely to get organic search engine traffic; the goal is to get organic search engine traffic to convert into new customers. If your website’s content gets in the way, then your rankings will not deliver a return on investment.