News for hackers. Stuff that matters.
Re:Default styles for h1 elements are changing by joquarky on Friday April 11, 2025 @11:03AM (#43654588)
> In fact, to the extent HTML elements are supposed to be semantic, we shouldn't have headline levels in the first place! Instead of <h1>, <h2>, ... we should just have <header> - the headline level is implicit in the nesting anyway

The <header> vs <h#> decision often ends up being a flow-breaking exception in my development process.

It also bugs me that we have exactly six hardcoded heading levels. Something about that feels like it violates a deep, lizard-brain-level DRY principle.

My main concern is how well screen readers and assistive tech would handle a semantic-only approach, as the <h#> elements go all the way back to the beginning of HTML and are pretty deeply rooted in standard practices.

There are no comments on this comment yet.