HTML » Tags » h1, h2, h3, h4, h5, h6

Version: 2.0, 3.2, 4.0

Compability: Explorer 4, 5  Netscape 4, 6

<h#> ... </h#> where # = 1, 2, 3, 4,

The <h#> tags are used to create text headers for a document. They can display the header text in one of six different sizes. h1 is the largest size and, as the integer number increases to h6, the text size becomes progressively smaller. The exact display appearance of the header text is browser dependent.

This tag also automatically inserts a carriage return and line feed after the closing tag (i.e., a paragraph break).
It is common practice to use this tag in place of the font tag or style sheets to set a font size for the text of an entire document. However, the true purpose of this tag is only to create headers and titles. It is recommeded that you use style sheets to set the font properties for a text.
The closing tag is mandatory.


<h1>DevGuru in h1</h1>
<h2>DevGuru in h2</h2>
<h3>DevGuru in h3</h3>
<h4>DevGuru in h4</h4>
<h5>DevGuru in h5</h5>
<h6>DevGuru in h6</h6>

DevGuru in h1

DevGuru in h2

DevGuru in h3

DevGuru in h4

DevGuru in h5
DevGuru in h6
Language(s): HTML

See Also: