4 ms·
Has anyone ever encountered a real world scenario where you reached <h6>?
by TheAceOfHearts 3y ago
Has anyone ever encountered a real world scenario where you reached <h6>?
- graypegg 3y agoYep! The first tech job I ever had was at a hyper local marketing agency, so most of my time was spent updating restaurant menus and sales for little local stores. The restaurant menus would always reach into insane levels of hierarchy, mostly because many of them made way too many things. Sometimes you need the: Restaurant -> Menu -> Antipasti -> For Groups -> Fried -> Cheesy hierarchy to feature the mozza sticks and arancini correctly.
- zirror 3y agoYes, specs and other technical documents. For example, the html spec[1] itself. [1]: https://html.spec.whatwg.org/#link-type-next https://html.spec.whatwg.org/#link-type-next
- Biganon 3y agoI made a web version of a huge book written by my former professor/boss. It definitely used 6 heading levels, maybe even more.
- dsego 3y agoOne of many things that irk me, like why limit to 1-6 instead of allowing an attribute for arbitrary size, eg <h level=15>
- extra88 3y agoYou can go beyond 6 with ARIA, e.g. role="heading" aria-level="7". I don't know what the limit is. I think it's challenging to find distinct visual styles for many heading levels.
- runarberg 3y agoThey tried to make the the explicit number irrelevant and infer the level by the number of nested sections, so instead of: <article> <h1>Title</h1> <section> <h2>Section</h2> <section> <h3>Sub Section</h3> <section> <h4>Sub Sub Section</h4> </section> </section> </section> </article> You could simply use <h2> repeatedly and keep the semantic structure of the former. <article> <h1>Title</h1> <section> <h2>Section</h2> <section> <h2>Sub Section</h2> <section> <h2>Sub Sub Section</h2> </section> </section> </section> </article> However this was never implemented by any browser or screen reader and was finally dropped from the standard. http://html5doctor.com/computer-says-no-to-html5-document-outline/ http://html5doctor.com/computer-says-no-to-html5-document-ou...
- throwaway18533 3y agoXHTML 2 did that. It only had a <h> tag that was depending on <section> to define the level. In fact your code would be exactly like xhtml2, if you replaced <h1-6> with <h> I understand why some people might not like xhtml2, but it did have some good ideas for creating a semantic document Example: https://www.w3.org/TR/2010/NOTE-xhtml2-20101216/mod-structural.html#s_structuralmodule https://www.w3.org/TR/2010/NOTE-xhtml2-20101216/mod-structur...