Re:Default styles for h1 elements are changing
by jpc0 on Sunday April 13, 2025 @03:27AM
(#43670809)
The argument I was making was what is why would
<main>
<h1>Main Heading</h1>
section..h2... Etc
</main>
<aside>
<h1>Aside heading</h1>
section...h2...
</aside>
Be incorrect? The original html standard clearly stated this was acceptable but now there should only be a single H1 which is the page heading and all other headings should be H2 and lower. What if the page content doesn't actually have a single main heading? This change fundamentally changes the semantics of something which has had unclear semantics for decades and which actually rendered what I typed above correctly in the past. Now it would not be rendered correctly anymore.
Re:Default styles for h1 elements are changing
by zcorpan on Sunday April 13, 2025 @03:45PM
(#43675325)
The spec allows multiple top-level headings: https://html.spec.whatwg.org/multipage/sections.html#heading...
> Do not rely on default browser styles for conveying a heading hierarchy. Explicitly define your document hierarchy using <h2> for second-level headings, <h3> for third-level, etc.