Typography in HTML (Headings)

There are six levels of headings available to use in an HTML document. These levels range from from level 1 heading i.e. h1 tag to level 6 heading i.e. h6 tag. It is a common practice in all form of texts to use only one primary heading per page which can be called level 1 heading in the context of and HTML document. As the content on a page increases and there is a need to use more headings, further levels of headings should be used based on the content hierarchy.

All heading elements in HTML are block-level elements meaning they always start from a new line and any element written after a heading element also starts from a new line.

blog
by Jibran Advani
Published on:
3 August 2021
Last updated:
3 August 2021

Headings in HTML

There are six levels of headings in HTML ranging from level 1 heading to level 6 heading. A particular page should ideally have only one level one heading which would specify the page title. Below are few basic examples:

1<h1>Heading 1</h1>
2<h2>Heading 2</h2>
3<h3>Heading 3</h3>
4<h4>Heading 4</h4>
5<h5>Heading 5</h5>
6<h6>Heading 6</h6>
7