HTML <h1> - <h6> Heading Tag Reference

The h1 - h6 HTML tags mean Heading 1 to Heading 6, and they denote section headings.

Use them to give your content headings and subheadings.

The <h1> - <h6> HTML/xHTML tags

<h1> <h2> <h3> <h4> <h5> and <h6> are heading tags, used to denote a hierarchy of headings and subheadings. <h1> is the highest level heading and <h6> is the lowest level subheading.

When to use the <h1> - <h6> tags (semantic use)

There should be only one <h1> tag on each page, which is the main page heading. The rest of the content can be divided into sections with <h2> headings. These sections can then be divided into subsections with <h3> subheadings, and so on down to <h6>.

<h1> <h2> and <h3> are commonly used in articles etc. <h4> is less commonly used. <h5> and <h6> are usually only found in complex academic documents.

The heading tags are valid in all current versions of HTML and xHTML, and they should always have closing </h1> </h2> </h3>... tag.

Example of <h1> - <h6> tag use

<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>

The Output

This is a Heading 1

This is a Heading 2

This is a Heading 3

This is a Heading 4

This is a Heading 5
This is a Heading 6