HTML <h1> - <h6>

TukansTucis's avatar
Published Jun 20, 2021Updated Nov 5, 2025
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.

  • Front-end engineers work closely with designers to make websites beautiful, functional, and fast.
    • Includes 34 Courses
    • With Professional Certification
    • Beginner Friendly.
      115 hours
  • Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.
    • Beginner Friendly.
      7 hours

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

  • Front-end engineers work closely with designers to make websites beautiful, functional, and fast.
    • Includes 34 Courses
    • With Professional Certification
    • Beginner Friendly.
      115 hours
  • Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.
    • Beginner Friendly.
      7 hours