h1, h2, h3, h4, h5, h6


<hn > ... </hn >

Specifies a heading that briefly describes the section it introduces. There are six levels of headings, from h1 (most important) to h6 (least important). HTML syntax requires that headings appear in order (for example, an h2 should not precede an h1) for proper document structure. Doing so not only improves accessibility but aids in search engine optimization (information in higher heading levels is given more weight).


Start/End Tags



  • HTML 4.01
  • HTML5


Values: center | left | right
Deprecated. Not in HTML5. Used to align the header left, right, or centered on the page.
<h1>First-level Heading</h1>
<p>Paragraph text for comparison . . . </p>

<h2>Second-level Heading</h2>
<h3>Third-level Heading</h3>
<h4>Fourth-level Heading</h4>
<h5>Fifth-level Heading</h5>
<h6>Sixth-level Heading</h6>

Rendered Example

The following example shows how headings are commonly rendered in browsers by default.

First-level Heading

Paragraph text for comparison. . .

Second-level Heading

Third-level Heading

Fourth-level Heading

Fifth-level Heading
Sixth-level Heading