News for hackers. Stuff that matters.
Re:Default styles for h1 elements are changing by MBCook on Thursday April 10, 2025 @11:16PM (#43650168)
When did that H1 behavior become part of the spec?

I’ve been writing HTML since around ‘95 and don’t remember ever hearing of it before.

I suspect it would confuse the hell out of me if I had run into it. Sounds like a good thing to remove.

Re:Default styles for h1 elements are changing by jeroenhd on Friday April 11, 2025 @02:02AM (#43650915)
AFAIK it's one of those W3C versus WHATWG/browser vendor things. The spec has an algorithm, no browser actually implements it faithfully, and when browsers were still competing with each other nobody was going to break half the web to be spec compliant. The problem started decades ago (https://html5accessibility.com/stuff/2022/04/05/12-years-bey...).
Re:Default styles for h1 elements are changing by currysausage on Friday April 11, 2025 @02:59PM (#43657245)
If I remember correctly, W3C’s XHTML2 working group wanted a generic <h> tag [1], and WHATWG, focused on evolving HTML in a backwards-compatible manner, repurposed <h1> as a context-dependent heading tag instead.

[1] https://www.w3.org/TR/2010/NOTE-xhtml2-20101216/mod-structur....

Re:Default styles for h1 elements are changing by zcorpan on Friday April 11, 2025 @03:38AM (#43651379)
Re:Default styles for h1 elements are changing by _joel on Friday April 11, 2025 @04:41AM (#43651665)
Perhaps to address screen-readers and broken semantics of a page?
Re:Default styles for h1 elements are changing by GavinAnderegg on Friday April 11, 2025 @05:03AM (#43651858)
It changed with the introduction of HTML5. It was one of those ideas that’s great for spec nerds, but flew in the face of previous standards compliance. It’s something I used on a lot of sites in the 2010s, but that I no longer have access to change. I’m betting this will make some old sites built by standards fiends look weird in spots, but not break things too badly.

https://mattryall.net/blog/html-5-headings-and-sections