HTML Program to use heading tags in html document


March 21, 2022, Learn eTutorial
1488

HTML heading tags are defined with the <h1> to <h6> tags. <h1></h1> tag is giving the biggest font size among the heading tags. Usually, the font size of the header text decreases from tag <h1> to <h6>.

The following example shows the simple HTML program structure which uses these different HTML header tags separately.

HTML Source Code

                                          <!DOCTYPE html>
 <html>
    <head>
        <title>
            HTML PROGRAMING TUTORIALS - HEADING TAG
        </title>
    </head>
     
<body>
 <h1> This is the h1 header </h1>
 <h2> This is the h2 header </h2>
 <h3> This is the h3 header </h3>
 <h4> This is the h4 header </h4>
 <h5> This is the h5 header </h5>
 <h6> This is the h6 header </h6>
    </body>
</html>

                                      

OUTPUT

HTML