Elements – Heading Tag

Heading Tags

There are 6 heading tags — <h1>, <h2>, <h3>, <h4>, <h5>, <h6>. <h1> is used for main heading and rest for subheadings at different levels. <h1> heading’s size is biggest and it decreases as we go towards <h6>. Objective of having 6 headings is not to have headings of different size but to provide structure to the content. Size of headings can changed by using relative sizing in CSS. Generally one page should have one <h1> element which helps the search engines to understand the topic of the page.


<h1>This is main heading.</h1> <h2>This is subheading h2.</h2> <h3>This is subheading h3.</h3> <h4>This is subheading h4.</h4> <h5>This is subheading h5.</h5> <h6>This is subheading h6.</h6>

This article needs improvement. You can help improve this article. You can also write similar articles and help the community.