HTML uses headings (heading tags) to present text as titles and subtitles on web pages. There are six different HTML headings, from small to large, as displayed in the following HTML code example.
1 2 3 4 5 6 7 8 |
<h1>This is Heading One</h1> <h2>This is Heading Two</h2> <h3>This is Heading Three</h3> <h4>This is Heading Four</h4> <h5>This is Heading Five</h5> <h6>This is Heading Six</h6> |
The following is a text example of how the browser and this site will render those HTML Headings.
This is Heading One
This is Heading Two
This is Heading Three
This is Heading Four
This is Heading Five
This is Heading Six
As you can see in the above headings examples, the browser automatically will add some space (margin) above and below. HTML headings are helpful in search engine optimization as they define the content and structure of your web page and help search engines such as Google index your content.