HTML <h1> to <h6> tags
Definition and Usage
The <h1> to <h6> tags define headers. <h1> defines the
largest header. <h6> defines the smallest header.
Differences Between HTML and XHTML
The "align" attribute of the h1 to h6 element was deprecated in HTML 4.01.
The "align" attribute of the h1 to h6 element is not supported in XHTML 1.0 Strict DTD.
Example
| Source |
Output |
<h1>This is header 1</h1>
<h2>This is header 2</h2>
<h3>This is header 3</h3>
<h4>This is header 4</h4>
<h5>This is header 5</h5>
<h6>This is header 6</h6> |
This is header 1
This is header 2
This is header 3
This is header 4
This is header 5
This is header 6
|
Optional Attributes
DTD indicates in which DTD the attribute is
allowed. S=Strict, T=Transitional, and F=Frameset.
| Attribute |
Value |
Description |
DTD |
| align |
left
center
right
justify |
Specifies the alignment of the text in the header.
Deprecated. Use styles instead |
TF |
Standard Attributes
| id, class, title, style, dir, lang, xml:lang |
For a full description, go to Standard
Attributes.
Event Attributes
| onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup |
For a full description, go to Event
Attributes.
Try-It-Yourself Demos
Headings
Demonstrates the different headings in an HTML document.
Center
aligned heading
Demonstrates a center-aligned heading.
Want To Be A Web Master?
If you want to be a Web Master, you will have to host your web site with an ISP (Internet Service Provider).
MaximumASP offers seven different configurations of dedicated servers to meet your Windows and .NET hosting needs.
Hosted on our multi-tiered Enterprise Class network, these servers provide the performance, security and reliability
you need to host your high end web sites and applications.
Visit MaximumASP
|