References

Beginner-friendly references for web development, with live, editable examples.

The HTML <h6> tag

Element All modern browsers
In short

The HTML <h6> element is the sixth and lowest of the heading elements. It sits under an <h5>, and its 0.67em default makes it the smallest heading, about 10.72px beside 16px body text. HTML has no h7, so h6 ends the native scale.

Overview

The HTML <h6> element is the lowest heading element, one level under <h5>. In an outline that starts at h1 without skipping levels, an h6 comes after h1 through h5.

There is no h7 element. For a seventh level, you can set aria-level="7" on an h6 or on an element with role="heading", and Chrome exposes either one as level 7.

An h6 gets the smallest default of all the headings, 0.67em with 2.33em margins. Chrome renders that at 10.72px when the parent's text is 16px, well below the size of a normal paragraph.

Any heading may come after an h6, but only an h5 or another h6 may come right before it.

Syntax

<h5>Hinges</h5>
<h6>Hinge screws</h6>
<p>Use the 30 mm screws in the top hinge.</p>

Example

Live example
<h1 style="margin: 0.2em 0">Level 1</h1>
<h2 style="margin: 0.2em 0">Level 2</h2>
<h3 style="margin: 0.2em 0">Level 3</h3>
<h4 style="margin: 0.2em 0">Level 4</h4>
<h5 style="margin: 0.2em 0">Level 5</h5>
<h6 style="margin: 0.2em 0">Level 6</h6>
<p id="sizes"></p>
<script>
const list = [...document.querySelectorAll('h1, h2, h3, h4, h5, h6')].map(h => h.tagName + ' ' + getComputedStyle(h).fontSize);
document.getElementById('sizes').textContent = list.join(', ');
</script>

Best practices

  • Reserve h6 for headings inside an h5 section.
  • Set a font size on h6 in CSS whenever it appears, since it is the smallest heading by default.
  • Restructure the content rather than reaching for a seventh level, for example by moving a long section to a page of its own.
  • Use the <small> element, not an h6, for small print such as a disclaimer. The small element is meant for side comments like that.

Accessibility

An h6 sits at level 6, and custom headings built with aria-level are best kept no deeper. Some screen readers may handle deeper levels, but results with other browser and screen reader pairs can be unpredictable.

Frequently asked questions

Is h6 the smallest heading in HTML?
Yes, h6 is the lowest of the six heading levels and has the smallest default size. It renders at 0.67em, so a 16px parent gives it about 10.72px.
Is there an h7 tag after h6 in HTML?
No, HTML stops at h6, so there is no h7 element. A role=heading element with aria-level=7 can express a seventh level, though it's best not to go above 6.
Do I need to use all six levels down to h6?
No, a page doesn't need an h6, only as many heading levels as its sections have. HTML forbids skipping a level on the way down but requires none of the deeper levels.
Why is there so much space above and below an h6?
No heading has wider default margins than an h6, at about 25px each on 16px text. The margins are 2.33em of the h6's own font size, so a 1rem h6 gets about 37px unless margin-block is set too.
Do headings past h6 look like an h6?
Yes, the HTML standard styles computed levels 7 to 9 like an h6, at 0.67em. Only the headingoffset attribute produces those computed levels, not aria-level, and no browser enables headingoffset by default yet.