HTML5 tutorial - Heading tags.

The heading tags tell both visitors to your site and the spiders such as Googlebot the relative importance of the various elements of the content of your page.

The internet was originally used in universities and initially the style of anything published on the net tended to look more like an outline rather than an article one would read in a magazine.

Titles were placed in <h1> tags which displayed larger on the page. Subtitles went in <h2> through <h6> tags and lesser tags shrank both in font size and implicit relative importance.

<h1>h1 tag</h1>

<h2>h2 tag</h2>

<h3>h3 tag</h3>

<h4>h4 tag</h4>

<h5>h5 tag</h5>
<h6>h6 tag</h6>

For years I rarely used heading tags. Now I use them all the time. First and foremost Google likes them – and what Google wants Google gets.

Google rules. It's just that simple. As a web site designer your goal is to get people on your site and keep them there. Google gets them there.

A valid argument can be made that no private institution should wield that much power – but say what you will, Google's stated goal is to "return highly relevant results for every query" and they deliver. I use them all the time and you probably do too.

Google ranks "relevancy" in a number of ways. Heading tags are one of a number of things taken into consideration when Google indexes your site. Google assumes the contents of <h1> tags are more important than <h2> tags and so on.

So, you ask, won't filling a page with <h1> tags make your page rank higher? No! Such tricks are called "Spamdexing". Don't even try. Google doesn't like it. You will get caught and penalized. Let's be real. If you or I were able to outsmart the very bright people that work at Google – the highest and holiest in all Geekdom – I wouldn't be writing a beginner's tutorial and you wouldn't be taking it.

Google wants relevant content. Give it to them. As you design your site put the most important stuff in an <h1> tag. Less important information goes in <h2>, <h3> etc. heading tags. Do this and you will soon not only improve your ranking but you'll find it helps you design better sites. Visitors quickly find what they are looking for and having priorities clearly defined both in your head and in your code makes your work easier.

Remember that heading tags are just one criteria Google follows. What's in the title tag is most important and there are other factors that we will get into later, but don't underestimate how complicated websites can become. Heading tags can help keep things simple and orderly.


Spamdexing (also known as search spam, search engine spam or web spam) involves a number of methods, such as repeating unrelated phrases, to manipulate the relevancy or prominence of resources indexed by a search engine.
google · wikipedia ·