Be it a website or a book, they all have headings. And HTML Heading as the name suggests, specifies the Headings of an HTML file.
There are 6 headings specified by HTML that would define HTML Headings. They are <h1>, <h2>, <h3>, <h4>, <h5> and <h6>.
Be it a website or a book, you have seen that the main heading is big in size and there are sub headings those are little smaller compared to the main heading.
And this is exactly why there are 6 headings in HTML.
<h1> specifies the main heading and the text inside it is the biggest in size. Similarly, text inside <h2> is little smaller compared to <h1> and the same logic follows for other heading tags.
To use HTML headings, all you need to do is place the text inside the heading tags and HTML would display the texts accordingly.
Let us see the below example :
<html> <body> <h1>Heading 1</h1> <h2>Heading 2</h2> <h3>Heading 3</h3> <h4>Heading 4</h4> <h5>Heading 5</h5> <h6>Heading 6</h6> </body> </html>
So in the above example, we have specified all the 6 HTML headings.
The first heading(i.e. <h1>) specifies the first heading and the text inside it(i.e. Heading 1) is little bigger in size when compared to other tags.
<h1>Heading 1</h1>
Similarly, there is the text(i.e. Heading 2) inside the second heading(i.e. <h2>) and it is little smaller compared to the text inside <h1> tag.
So, while designing a webpage, you can use the HTML headings and place your headings and subheadings accordingly.
What if you want a Heading that should be bigger than the <h1> heading. In that case you can use the 'style' attribute and specify the 'font-size'.
<html> <body> <h1 style="font-size:100px;">A bigger Heading</h1> </body> </html>