Reference · Beginner
HTML heading elements
Use h1 through h6 to name sections and expose a logical content hierarchy instead of selecting headings by default size.
- Author
- Editorial team
- Reviewer
- Publication review pending
- Review tier
- annual
Definition
Heading elements represent headings for their sections. The number indicates the rank in the hierarchy, not a visual style.
Syntax
<h1>City trail guide</h1>
<section>
<h2>Accessible routes</h2>
<h3>Lake loop</h3>
</section>
Context and content
Use phrasing content inside a heading. Pages should normally expose one clear top-level heading and nest later headings in order.
Accessibility
Many screen-reader users navigate by heading. A concise, ordered hierarchy makes that navigation predictable. CSS should supply appearance.
Common misuse
Do not skip ranks only to obtain a smaller font. Do not put an entire paragraph inside a heading. Empty headings create misleading navigation stops.