HTML's Implicit Heading Levels Removed
2025-04-11

The HTML specification previously defined an outline algorithm that implicitly determined the semantic heading level of
elements based on nesting within sectioning elements (, , , ). Browsers rendered section > h1 with the same font-size and margins as , section > section > h1 as
, and so on. This default rendering was in browser UA stylesheets, but not the accessibility tree (used by screen readers). Websites using sectioning elements unexpectedly saw these auto-generated heading levels. This caused confusion over
usage, inconsistent tool handling, and the algorithm was deemed problematic. The algorithm was removed in 2022, but UA stylesheet rules remained. Now, browser vendors are removing those default styles.
Development