HTML <h1> - <h6>Tag
Examples
Six different HTML headings:
<h1>This is heading 1</h1>
<h2>This is heading 2</h2>
<h3>This is heading 3</h3>
<h4>This is heading 4</h4>
<h5>This is heading 5</h5>
<h6>This is heading 6</h6>
Try it Yourself »
Browser Support
![]()
All major browsers support the <h1> - <h6> tags.
Tag Definition and Usage Instructions
The <h1> - <h6> tags are used to define HTML headings.
<h1> defines the heading with the highest importance. <h6> defines the heading with the lowest importance.
Differences between HTML 4.01 and HTML5
In HTML 4.01, the "align" attribute of <h1> - <h6> was deprecated. In HTML5, the "align" attribute of <h1> - <h6> elements is not supported. Please use CSS to align elements.
Attributes
| Attribute | Value | Description |
|---|---|---|
| align | left center right justify |
Not supported in HTML5. Deprecated in HTML 4.01.Specifies the alignment of text in the heading. |
Global Attributes
The <h1> - <h6> tags supportHTML's Global Attributes。
Event Attributes
The <h1> - <h6> tags supportHTML's Event Attributes。
Related Articles
HTML Tutorial:HTML Headings
Other Extensions