English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

Comprehensive HTML Tags

HTML: <h1> – <h6> Tag

In an HTML document, titles are important, and it is equally important to use them correctly.

Online Examples

Six different HTML titles:

<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
<title>Basic Tutorial Website(oldtoolbag.com)</title> 
</head>
<body>
<h1>This is a Heading 1</h1> 
<h2>This is a Heading 2</h2> 
<h3>This is a Heading 3</h3> 
<h4>This is a Heading 4</h4> 
<h5>This is a Heading 5</h5> 
<h6>This is a Heading 6</h6>
</body>
</html>
Test it out ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

All major browsers support <h1> - <h6> tag.

Tag Definition and Usage

<h1> - <h6> tag is used to define HTML headings.

<h1> defines the highest level of importance for headings.<h6> defines the lowest level of importance for headings.

HTML 4.01 with HTML5differences

In HTML 4.01 in, <h1> - <h6> align attribute has been deprecated. In HTML 5 in, <h1> - <h6The "align" attribute of the <h> element is not supported. Please use CSS to align elements.

Attribute

AttributeValueDescription
alignleft
center
right
justify
HTML5 Not Supported. HTML 4.01 Deprecated. Defines the alignment of the title text.

Global Attributes

<h1> - <h6Tag Support HTML Global Attributes.

Event Attributes

<h1> - <h6Tag Support HTML Event Attributes.

Related Articles

HTML Tutorial:HTML Titles