How to add headlines with HTML

When builing your HTML page you probably want some headlines. HTML provide 6 headline tags consisting of H1, H2, H3, H4, H5 and H6. The lower the number the higher the value. You should only have one H1 tag per page, a couple of H2 tags and some H3 tags and lower. This depends on the length of the page. So this is how a H1 would look like…

<H1>Your headline text</H1>

A headline consist of two tags. A starting tag and an ending tag. Your headline text is placed between these two tags. You can replace H1 with any of the other numbers. Just make sure that the beginning tag and the finishing tag contains the same number. Mixed tags will break your HTML structure.

H-tags does not contain any attributes but you can add a class or ID for styling purposes. Just like this…

<H1 class="big-headline">This is a great tutorial</H1>

In your CSS you can now style the headline using the big-headline class.

  Written by: Michael from     25-08-2022     Written in: HTML tutorials

One comment

  • Shawn says:

    This tutorial on how to add headlines with HTML was super helpful! I’ve always wanted to know how to make my text standout and now I can easily do it using HTML tags . The step-by-step instructions and examples given in this article made it really easy to understand. Thank you so much for sharing this valuable information!

Leave a Reply

Your email address will not be published. Required fields are marked *