Favorites

HTML headingoffset Global Attribute

headingoffset
HTML Global AttributeThis global attribute is supported in some modern browsers, but not all.
Updated 22nd November 2026

The headingoffset attribute raises the level of the headings inside an element for assistive technology, without changing the heading tags. It is experimental.

☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee

Description

This is an experimental attribute. Chrome, Edge and Opera support it only behind the #enable-experimental-web-platform-features flag, and Firefox only behind a preference.

The headingoffset global attribute raises the heading level of the headings inside the element, as exposed to assistive technologies, without changing which heading element is used. It makes it possible to reuse a piece of content, such as a component, an article preview or an embedded document, that starts with an <h1>, and still keep a correct outline in the page.

The value is a whole number from 0 to 8. To find the level of a heading, the browser adds up the headingoffset values of the heading and all its ancestors (also across shadow boundaries); an invalid value counts as 0, and the level never goes above 9. For example, an <h1> inside an element with headingoffset="1" that is inside another with headingoffset="2" has level 4. Levels 7 to 9 can only be reached this way or with aria-level.

<h1>Insect guide</h1>           <!-- level 1 -->
<section headingoffset="1">
  <h1>Appendix</h1>             <!-- level 2 -->
</section>

The attribute does not change the element name, so CSS selectors such as h1 still match and the default styling does not change. An explicit aria-level takes precedence. Use headingreset to stop offsets from ancestors applying inside an element.

Syntax

<element headingoffset="number">

Values

  • numberA whole number from 0 to 8 that is added to the level of the headings inside the element. Invalid values count as 0.

Example

<h1>Insect guide</h1>
<section headingoffset="1">
<h1>Appendix (level 2)</h1>
<section headingoffset="1">
<h1>Glossary (level 3)</h1>
</section>
</section>
<p>Inspect the headings in the accessibility tree of your browser's developer tools to see their computed level.</p>
Open in editor

Browser Support

The following information will show you the current browser support for the HTML headingoffset global attribute. Hover over a browser icon to see the version that first introduced support for this HTML global attribute.

This global attribute is supported in some modern browsers, but not all.

Desktop

Chrome
Edge
Firefox
Opera
Safari

Tablets & Mobile

Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-
Supported Unknown Not supported
☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee