What is Heading Tag in HTML ?

It is used for specifying the headings or titles in the HTML document, It is Container Type of Tag.

Attributes:

  • align: It is used to specify the alignment of headline. Values are “left, right, center and justify’. e.g. align=”left’ (default).

Example:

<HTML>
<HEAD>
<TITLE>Heading</TITLE>
</HEAD>
<BODY>
<H1> Chapter l</H1>
<H2> Chapter2</H2>
<H3> Chapter3</H3>
<H4 > Chapter 4</H4>
<H5> Chapter5</H5>
<H6> Chapter6</H6>
</BODY>
</HTML>

OutPut – Try it Your Self 

In the above example  the text within <H1> tag will be displayed in large size and it would be center aligned. There are 6 headline levels where <H1> is highest level and <H6> is the lowest level.

 

Leave a Comment