Loading...
HTML <h1> to <h6> Tag

HTML <h1> to <h6> Tag

In this tutorial, we will learn about heading tags in HTML with the help of examples.


Heading Tags

The Heading tags are used to define heading in an HTML document.
There are six type of heading tags from <h1> to <h6> .

Note : The <h1> tag define the largest and the most important heading. <h6> tag define the smallest and the least important heading.

Syntax

<h1>.......</h1>
<h2>.......</h2>
<h3>.......</h3>
<h4>.......</h4>
<h5>.......</h5>
<h6>.......</h6>

Example

<!DOCTYPE html>
<html>
  <head>
    <title>Document</title>
  </head>
  <body>
    <h1 title = "Heading 1">Hello World!</h1>
    <h2 title = "Heading 2">Hello World!</h2>
    <h3 title = "Heading 3">Hello World!</h3>
    <h4 title = "Heading 4">Hello World!</h4>
    <h5 title = "Heading 5">Hello World!</h5>
    <h6 title = "Heading 6">Hello World!</h6>
  </body>
</html>

Output

Hello World!

Hello World!

Hello World!

Hello World!

Hello World!
Hello World!

Global Attribute

Heading Tag support all the global attributes of HTML.


Event Attribute

Heading Tag support all the event attributes of HTML.


Next Tutorial

We hope that this tutorial helped you develop better understanding of the concept of Heading tag in HTML.

Keep Learning : )

In the next tutorial, you'll learn about HTML head Tag.

- Related Topics