<h1> - <h6>

The <h_> elements represent text headings for sections of content. They range from <h1> being the highest level of heading to <h6> being the lowest.

Syntax

<h1>
<!-- Text for heading goes here -->
</h1>

<h1> contains text-based information and can include other tags meant for text, like links.

Example

<html>
<head>
</head>
<body>
<h1>Title of the Page</h2>
<h2>Name of First Section</h2>
<p>Text from first section.</p>
<h2>Name of Second Section</h2>
<p>Text from second section.</p>
</body>
</html>

Output of the example above for headings

Contributors

Interested in helping build Docs? Read the Contribution Guide or share your thoughts in this feedback form.

Learn HTML on Codecademy