Easy Tutorial
❮ Att Base Href Att Tfoot Valign ❯

HTML <h1> - <h6> Tags

Example

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>

Browser Support

All major browsers support the <h1> - <h6> tags.


Tag Definition and Usage

The <h1> - <h6> tags are used to define HTML headings.

<h1> defines the most important heading. <h6> defines the least important heading.


Differences Between HTML 4.01 and HTML5

In HTML 4.01, the "align" attribute of <h1> - <h6> was deprecated. In HTML 5, the "align" attribute of <h1> - <h6> elements is not supported. Use CSS to align elements.


Attributes

Attribute Value Description
align left <br>center <br>right <br>justify Not supported in HTML5. Deprecated in HTML 4.01. Specifies the alignment of the text in the heading.

Global Attributes

The <h1> - <h6> tags support HTML's global attributes.


Event Attributes

The <h1> - <h6> tags support HTML's event attributes.


Related Articles

HTML Tutorial: HTML Headings

❮ Att Base Href Att Tfoot Valign ❯