News for hackers. Stuff that matters.
Re:Default styles for h1 elements are changing by jrvieira on Friday April 11, 2025 @06:30AM (#43652364)
completely defeating the purpose of html semantics in the first place
Re:Default styles for h1 elements are changing by maccard on Friday April 11, 2025 @08:05AM (#43652889)
Honestly that ship has long since sailed.
Re:Default styles for h1 elements are changing by ramses0 on Friday April 11, 2025 @09:09AM (#43653347)
There is hope! I was going to point to my favorite example of the [menu] element being deprecated, but it looks like it's been un-deprecated!

I've tried to find better references, but mostly coming up with tutorial-trash and random `.edu` sites.

Menu Deprecation Notice: https://www.w3.org/TR/WD-html40-970708/appendix/changes.html

Menu Deprecated in HTML 4: https://www.w3.org/TR/html401/struct/lists.html#h-10.4

Menu Part of HTML 5 Spec: https://www.w3.org/TR/2011/WD-html5-20110405/interactive-ele...

Other Commentary: https://dpogue.ca/articles/html5-menu.html

Random bug report: https://github.com/IBMa/equal-access/issues/752#issuecomment...

Re:Default styles for h1 elements are changing by HelloNurse on Friday April 11, 2025 @09:21AM (#43653459)
Why? Just use different h1...h6 family tags depending on your structure.

The example in the article

<body> <h1>Level 1</h1> <section> <h1>Level 2</h1> <section> <h1>Level 3</h1> <section> <h1>Level 4</h1> </section> </section> </section> </body>

can become

<body> <h1>Level 1</h1> <section> <h2>Level 2</h1> <section> <h3>Level 3</h1> <section> <h4>Level 4</h1> </section> </section> </section> </body>

Re:Default styles for h1 elements are changing by galleywest200 on Friday April 11, 2025 @10:24AM (#43654149)
> tools like Lighthouse now flag cases of <h1>s without defined font-size as bad practice.

You forgot to include a font size in your h1's which is what people are complaining about needing to do.

Re:Default styles for h1 elements are changing by tallytarik on Friday April 11, 2025 @11:18AM (#43654823)
The warning is only for <h1>s inside a section, so GP’s example — where the only h1 is at the top level — would not be flagged.
Re:Default styles for h1 elements are changing by albedoa on Friday April 11, 2025 @11:31AM (#43654995)
If that is true, then TFA seriously missed the mark:

> Alongside the changes in browser styles, page auditing tools like Lighthouse now flag cases of <h1>s without defined font-size as bad practice.

Then when listing what to expect:

> Lighthouse will flag a warning if <h1> is used without a specified font-size.

And under the section "Fixing the Lighthouse warning":

> Lighthouse has recently inherited a check based on Chromium's DevTools warnings for sites that don't specify a font-size for <h1> elements.

Then it uses top-level h1 selectors in its examples of recommended styles. I mean you might be right about when that warning will appear, but the article doesn't seem to think you are.

Re:Default styles for h1 elements are changing by tingletech on Friday April 11, 2025 @12:16PM (#43655507)
The error is named `H1UserAgentFontSizeInSection` -- makes it seems like it would only fire for an H1 used in a section?
Re:Default styles for h1 elements are changing by zcorpan on Sunday April 13, 2025 @03:32PM (#43675242)
TFA has been fixed to make this clearer. Thanks!