TutorialsPreview
ReferenceReferencebeginner5 min

HTML Headings

Answer-first: the six levels, their defaults, and the element’s quick facts.

You will learn

The levels, their semantics, default rendering, and the element’s DOM facts — at a glance.

<h1>
Page / document title. One per page.
<h2>
Major section.
<h3>
Sub-section of an h2.
<h4>
Sub-section of an h3.
<h5>
Rarely needed — deep nesting.
<h6>
The lowest level. Almost never required.
The six levels
PropertyValue
Content categoryFlow content, heading content, palpable content
Permitted contentPhrasing content (text, <a>, <span>, <em>…)
Permitted parentsAny element that accepts flow content
Implicit ARIA roleheading (with aria-level = tag number)
DOM interfaceHTMLHeadingElement
Default displayblock
Default marginTop + bottom, shrinking with level
Element quick facts
TagApprox. sizeDefault weight
h12.00embold
h21.50embold
h31.17embold
h41.00embold
h50.83embold
h60.67embold
Default font-size in most browsers (relative to body)
HTML
<h1>Site or page title</h1>
<h2>Section</h2>
<h3>Subsection</h3>
Canonical usage

Reference

The whole HTML reference

Every element and concept, answer-first.

More like this

H
Reference·beginner·8 min

HTML Headings

h1 through h6 are the page’s table of contents. Use them for structure, never for size — that’s what CSS is for.

H
Reference·intermediate·18 min

HTML Headings

h1–h6 are instances of HTMLHeadingElement. They take no special attributes — only the global set and ARIA — but there’s real depth in how they form the document outline and what you can do with them from JavaScript.

H
Reference·beginner·2 min

HTML Headings

Headings, distilled to what you must remember.

Liked this one?

Pass it on

Discussion

Be the first to ask

Your questions stay private with the team. We can pin answers to share with everyone.

Sign in to ask a question privately on this tutorial.

Sign in

No pinned answers yet for this tutorial.