3 ms·
What's that <h/>?
by Mikhail_Edoshin 5y ago
What's that <h/>?
- eyelidlessness 5y agoIt’s h1-n but its hierarchy was determined by semantic parent structure rather than its own declaration. IIRC you could use similar semantics to the existing h-tags within a given hierarchy with an attribute. And I’m pretty sure this lived through some of the early HTML5 process, but ultimately didn’t make it through.
- zozbot234 5y agoYou can do that in HTML5 via the <section> and <article> tags. An h1 tag within one of these elements is equivalent to a subheading, and nesting <section> elements to create a deeper structure is also allowed.
- Klaster_1 5y agoHere's an article on the topic: https://www.smashingmagazine.com/2020/01/html5-article-section/ https://www.smashingmagazine.com/2020/01/html5-article-secti... . Unfortunately, browsers do not support this case properly.
- eyelidlessness 5y agoIIRC this doesn’t actually change the semantic hierarchy of the headings, and e.g. screen readers/reader mode will still treat both h1s as equivalent.