<h1>-<h6>

Browser
  • IE
  • Cr
  • Sf
  • Fx
  • O
Type

The H1, H2, H3, H4, H5, and H6 elements defines headings.


<h1>heading</h1>

There are six levels in headings : from <h1> (Largest header) to <h6> (Smallest header)

<h1>Primary heading</h1>

<h2>Secondary heading</h2>

<h3>Third-level heading</h3>

<h4>Fourth-level heading</h4>

<h5>Fifth-level heading</h5>
<h6>Sixth-level heading</h6>

The font size can be changed with CSS.

How to use headings

h1 Primary heading
h2 Secondary heading
h3 Third-level heading
h2 Secondary heading
h3 Third-level heading

Example


<h1>Primary heading</h1>
<p>Paragraph text</p>

<h2>Secondary heading</h2>
<p>Paragraph text</p>

<h3>Third-level heading</h3>
<p>Paragraph text</p>

Output

Primary heading

Paragraph text

Secondary heading

Paragraph text

Third-level heading

Paragraph text

Example of heading image

<h1><img src="heading.gif" alt="Primary heading"></h1>
<p>Paragraph text</p>

Output

Primary heading

Paragraph text