HTML Headings Tags H1, H2, H3, H4, H5, H6

In this lession, you will learn totall six levels html headings tags, i.e. <h1> <h2> <h3> <h4> <h5> and <h6>.  <h1> is the most important tag, while <h2> is the second important tag for an HTML document. The web browser automatically implements some elements to these tags, e.g. font size, line break, margin spaces etc.

Example of HTML Headings Tags <h1> to <h6>

Following codes shows the six different HTML headings. Write this code in a text editor such as notepad or Notepad ++. Save it as a filename.html and then visualize it in your browser, checking that you get the expected result.

How to write HTML headings tags?

  • Open a Notepad in your computer.
  • Copy all the above codes and paste it into the Notepad window.
  • Save this file with an HTML extension, e.g. filename.html
  • Now, double click on this file to view the HTML document’s headings.

Attribute Supports:

The following attributes support by heading HTML headings.

If the align attribute doesn’t work then you can use the CSS code instead of.

Support CSS Codes:

Importance of HTML Headings Tags in SEO:

Heading Tags are highly recommended by search engines, like Google, Yahoo, etc. therefore, if you want to rank any keyword, then you must include it in the heading element especially in <h1> and <h2> tags.

Keep in mind that on a page you could put a large text indicating it in another way, for example by modifying the font size without using a header. Why then use headers? The headers give special relevance to the text, and in fact search engines like google, yahoo or bing when they find a <h1> tag give more relevance than a text of the same size that is not a header. It is therefore convenient to use the tags <h1>, <h2>, etc. to obtain a better positioning of web pages in the search engines. That is, using <h1> not only means enlarging the size of the text, it also means indicating that the text included between those labels is of greater importance than the rest of the text and this is valued by the search engines. Of course, it will not do any good if you try to include all the text of your web page inside heading tags because search engines are not stupid, they will detect that “trick” and even penalize you by doing this. Therefore headings should be used with moderation and balance.

Subscribe Our Free Articles! Enter your Email...