HTML Headings

HTML HTML Headings Headings Attributes

Html Headings

Heading is an important tag in body of html document. It is used to display different types of headings.

<html> <body> <h1>This is Largest heading</h1> <h2>This is Larger Heading</h2> <h3>This is Large Heading</h3> <h4>This is Small Heading</h4> <h5>This is Smaller Heading</h5> <h6>This is Smallest Heading</h6> </body> </html>

The opening tag for a heading is <hn> and the closing tag is </hn>. NOTE: where n is size of heading. Its value is from 1 to 6. The value 1 represents the largest and the value 6 represents the smallest. Each Html Heading has Default size.


This is Largest heading

This is Larger Heading

This is Large Heading

This is Small Heading

This is Smaller Heading
This is Smallest Heading

Headings are Important :-

HTML heading provides valuable information by highlighting important topics . Browser use Headings to index the structure of web pages. NOTE: Don't use headings to Big or Bold the Text.

Heading Size:-

<h1 style="font-size:30px;">Heading size 30px</h1>

You can increase or decrease the size of the heading with style attribute.


Heading size 30px

Aligning Heading:-

<h1 align="center">Heading Align Center</h1>

You can Align Heading to center, left or right.


Heading align center

The default alignment of heading is left. HTML Headings Attributes Chapter Next »