Headings In HTML Language

Headings In HTML Language

 

Headings In HTML Language

Headings are very important tags in the BODY of the HTML document. It is used to display different types of headings. The opening tag of a heading is <Hn> and the closing tag of the heading is </Hn> where n is the size of the heading. Its value is from 1 to 6. The value 1 represents the largest and the value 6 represents the smallest heading size.

Attributes

Some important attributes of the heading tag are as follows

ALIGN

It specifies the alignment of the heading. The possible values are center, left and right. The default value is left.

Example

<H1 Align="center">Hello</H1>
This example line will display the heading in the center of the page.

Now take a look at the practical of this article.
Open your Notepad and type the following HTML code.

<HTML>
<BODY>
<H1>My 1st heading</H1>
<H2>My 2nd heading</H2>
<H3>My 3rd heading</H3>
<H4>My 4th heading</H4>
<H5>My 5th heading</H5>
<H6>My 6th heading</H6>
</BODY>
</HTML>


Now save it as heading.html
Double click on the file and open it with your browser you will see it as.

Headings In HTML Language