<h1> - <h6>

christian.dinh's avatar
Published Jun 20, 2021Updated Jul 1, 2022
Contribute to Docs

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

All contributors

Contribute to Docs

Learn HTML on Codecademy