How to Use HTML Header Tags

There are six levels of HTML header tags. Heading tags are usually used to introduce the subject of content. The text below shows examples of each heading level, after your browser has rendered each tag.


<h1> Example

<h2> Example

<h3> Example

<h4> Example

<h5> Example
<h6> Example

The level of importance for each header tag ranks from lowest to highest, meaning <h1> tags are wrapped around content that is more important than content wrapped in an <h2> and so on.

Usage

The <h1> tag is typically used as the first-level heading of a document or page section. Heading tags should be used in order of importance, meaning an <h5> tags should not be used before an <h3> tag.

For example, an <h1> tag could be used as a blog posting’s title and then followed by an<h2> tag describing the blog post’s sub-title.

If your web design requires a smaller font size for your heading you should not replace an<h1> tag with a smaller, or lower level tag. Instead use CSS to determine how large your font should be displayed.