How To Use H1 to H6 Headings Properly
Headings are Block Elements that generate an automatic line break. For this reason, it is not necessary to force a line break by using the <br> tag before and after the heading.
In HTML, headings are created with the HTML tags <h1> to <h6>. The most important heading is H1. It is then followed by the headings H2, H3, ... in hierarchical order.
H1 indicates the main heading of the web page and should be used only once on each and every web page. To structure the text logically, the headings H2, H3, ... should be used. Subheadings divide the text into logical sections.
Headings are started with the HTML tags <
, …. Without CSS, the headings are displayed in 6 different font sizes by default.
Heading | Font Size |
H1 Heading | 2.0em |
H2 Heading | 1.5em |
H3 Heading | 1.17em |
H4 Heading | 1.0em |
H5 Heading | 0.83em |
H6 Heading | 0.75em |
A Level 1 Heading (main level) is created with the HTML <h1> tag.
<h1>This is a 1st Order Heading
</h1>
This is a 1st Order Heading
A Level 2 Heading is created with the HTML <h2> tag.
<h2>This is a 2nd Order Heading
</h2>
This is a 2nd Order Heading
A Level 3 Heading is created with the HTML <h3> tag.
<h3>This is a 3rd Order Heading
</h3>
This is a 3rd order heading
Headings divide the website into hierarchical text areas that provide structure for readers and Search Engines. Do not skip or omit any heading level. Always start from <h1>, followed by <h2> and so on. For most websites, headings H1 to H3 are sufficient.
Note:The use of the correct closing tag of the heading is mandatory.