[HTML] The Heading Tag H1 to H6

This article gives a brief description about the Heading Tag.

As the name suggests, the Heading is used to define the headings in the HTML, Just like you generally heading in your notebooks before starting the main content.

Heading tells what the content is all about to the front-end user.

Heading tag contains one letter H in it followed by a number between 1 to 6.

Ex: <H1> is used for Heading 1.

The number that you write/provide to the heading tag will decide the size of your heading. 1 means the biggest heading and 6 means the smallest heading in size, that may be used as sub-heading of the main heading.

So now here we have 6 heading tag that varies in the size according to the number given to them.

For the sake of your better understanding, here I have given all of the heading tags:

  • <H1>…</H1>
  • <H2>…</H2>
  • <H3>…</H3>
  • <H4>…</H4>
  • <H5>…</H5>
  • <H6>…</H6>

Also, have a look at the code below:


<h1>Hello! This Heading 1</h1>

<h2>Hello! This Heading 2</h2>

<h3>Hello! This Heading 3</h3>

<h4>Hello! This Heading 4</h4>

<h5>Hello! This Heading 5</h5>

<h6>Hello! This Heading 6</h6>


Try it on Real-Time Editor!




 Align  Outdated. Don’t use it.


Hope you got this. Do share your feedback on our new Real-Time Editor in the comments below.