HTML Tutorial – Headings

Headings are crucial in HTML documents.

A heading element usually describes the topic of the section it introduces.
HTML Headings are defined with the <h1> to <h6> tags where <h1> is the most important and <h6> is the least

HTML Heading Examples

<!DOCTYPE html>
<html>
<body>
<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>
</body>
</html>
Try it yourself »

Headings Are Important

Search engines use the headings to index the structure and content of your web pages. Users skim your pages by its headings. It is important to use headings to show the document structure.

Tip On Using Headings

Use the heading tag only for the text. Do not use it to make a text big or bold.
Search engines pay attentions to the headings, so use it wisely. <h1> headings should be used as main headings, followed by <h2> headings, then the less important <h3> headings, and so on.