3 ms·
Seems like the proper fix would be to introduce a <h> element with heading level dictated only by the number of <section> nesting. But it's too late for that no
by p4bl0 1y ago
Seems like the proper fix would be to introduce a <h> element with heading level dictated only by the number of <section> nesting. But it's too late for that now I guess.
Anyway, I'm quite surprised to learn all this about <h1> while I've always read everywhere up until today and including on MDN (Mozilla's documentation), that one should use only one <h1> per page.
Now I wonder if and how <section> nesting affects <h2>, <h3>, etc.
- JohnHaugeland 1y agothat exists https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/header https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/...
- p4bl0 1y agoI don't understand <header> to be a heading element (i.e., a section title). Instead it is a semantic container for heading elements: title, date, author, maybe category/tags, etc. To me, the heading level used inside a given <header> is a distinct, somewhat orthogonal thing (at least in how it is decided, from the nesting level or the tag name).