Favorites

HTML aria-level ARIA Attribute

aria-level
ARIA AttributeThis ARIA attribute is supported by all modern browsers.
Updated 28th November 2026

The aria-level attribute gives the hierarchical level of an element in a structure, such as the level of a heading or the depth of an item in a tree.

☕
Enjoying this site?

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

Buy us a coffee

Description

The aria-level attribute defines the level of an element within a hierarchy, starting at 1. It is required on the heading role, where it plays the same part as the number in <h1> to <h6>, and it is used on tree items and treegrid rows to show how deeply they are nested.

On a tree, the browser can usually work out the level from the DOM structure when items are nested in groups. Set aria-level when the structure is flat in the DOM, or when only part of the tree is loaded, together with aria-posinset and aria-setsize.

For headings, the native elements are better: <h2> is simpler and more reliable than role="heading" aria-level="2". Don't use aria-level to change the level of a native heading element.

Properties

Type
Widget
Value
integer
Default
None
Used with
comment, heading, listitem, row, treeitem

Syntax

<element role="heading" aria-level="number">

Values

  • integerThe level, 1 or higher.

Example

<div role="heading" aria-level="2" style="font-size:1.4em;font-weight:bold">Shipping</div>
<p>We ship to most countries.</p>
<div role="heading" aria-level="3" style="font-size:1.15em;font-weight:bold">Delivery times</div>
<p>Most orders arrive within a week.</p>

Browser Support

The following information will show you the current browser support for the aria-level ARIA attribute. Hover over a browser icon to see the version that first introduced support for this ARIA attribute.

This ARIA attribute is supported by all modern browsers.

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