Heading Tags

By Tony 2023.2.22


Headings make reader knows what's the article, image, chart, map... is mainly about. Headings are everywhere. This article will tell you how to make headings in HTML.

A newspaper full of headings
A newspaper full of headings

Here is some code of headings:

<h1>I'm the biggest heading</h1>
<h2>I'm the second biggest heading</h2>
<h3>I'm the third biggest heading</h3>
<h4>I'm the third smallest heading</h4>
<h5>I'm the second smallest heading</h5>
<h6>I'm the smallest heading</h6>


Note: Every heading tag has a closing tag.

We listed 6 different levels of heading above. The first level is <h1></h1> tags, which is the biggest heading. The sixth level is <h6></h6> tags, which is the smallest heading.
Here is the output:

I'm the biggest heading

I'm the second biggest heading

I'm the third biggest heading

I'm the third smallest heading

I'm the second smallest heading
I'm the smallest heading

Always remember to put each heading's closing tag to wrap up the text inside the tags. You can style headings, give them id or class, or give them titles. <h1></h1> and <h2></h2> are the heading tags used most often. Have fun exploring heading tags!