Skip to content

Commit 9d28a3e

Browse files
authored
Update "Specifying a uniform font size for h1" (#39582)
See whatwg/html#11102
1 parent 570370b commit 9d28a3e

File tree

1 file changed

+2
-5
lines changed
  • files/en-us/web/html/reference/elements/heading_elements

1 file changed

+2
-5
lines changed

files/en-us/web/html/reference/elements/heading_elements/index.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,9 @@ Prefer using only one `<h1>` per page and [nest headings](#nesting) without skip
7777

7878
### Specifying a uniform font size for `<h1>`
7979

80-
The [HTML standard](https://html.spec.whatwg.org/multipage/rendering.html#sections-and-headings) specifies that `<h1>` elements in a `<section>`, `<article>`, `<aside>`, or `<nav>` element should render as an `<h2>` (smaller {{cssxref("font-size")}} with an adjusted {{cssxref("margin-block")}}), or as an `<h3>` if nested another level, and so on.
80+
Before May 2025, the [HTML standard](https://html.spec.whatwg.org/multipage/rendering.html#sections-and-headings) specified that `<h1>` elements in a `<section>`, `<article>`, `<aside>`, or `<nav>` element should render as an `<h2>` (smaller {{cssxref("font-size")}} with an adjusted {{cssxref("margin-block")}}), or as an `<h3>` if nested another level, and so on. This special context-dependent default style has now been [removed](https://github.com/whatwg/html/issues/7867).
8181

82-
> [!NOTE]
83-
> There is a [proposal](https://github.com/whatwg/html/issues/7867) to remove this special default style, so that `<h1>` always has the same default style. This proposal is currently [implemented in Firefox Nightly](/en-US/docs/Mozilla/Firefox/Experimental_features#ua_styles_for_h1_nested_in_sectioning_elements).
84-
85-
To ensure consistent `<h1>` rendering, use the following style rule:
82+
To ensure consistent `<h1>` rendering for browsers that implement the old context-dependent default style, use the following style rule:
8683

8784
```css
8885
h1 {

0 commit comments

Comments
 (0)