From http://www.w3schools.com (Copyright Refsnes Data)

HTML 5 <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 4.01 and HTML 5

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 HTML 5. Use CSS to align elements.


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


Attributes

Attribute Value Description 4 5
align left
center
right
justify
Specifies the alignment of the text in the header. Deprecated. Use styles instead 4  

Standard Attributes

class, contenteditable, contextmenu, dir, draggable, id, irrelevant, lang, ref, registrationmark, tabindex, template, title

For a full description, go to Standard Attributes in HTML 5.

Event Attributes

onabort, onbeforeunload, onblur, onchange, onclick, oncontextmenu, ondblclick, ondrag, ondragend, ondragenter, ondragleave, ondragover, ondragstart, ondrop, onerror, onfocus, onkeydown, onkeypress, onkeyup, onload, onmessage, onmousedown, onmousemove, onmouseover, onmouseout, onmouseup, onmousewheel, onresize, onscroll, onselect, onsubmit, onunload

For a full description, go to Event Attributes in HTML 5.


Try-It-Yourself Demos

Headings
Demonstrates the different headings in an HTML document.


From http://www.w3schools.com (Copyright Refsnes Data)