News for hackers. Stuff that matters.
Re:A Blog Post with Every HTML Element by TheAceOfHearts on Saturday August 12, 2023 @10:30PM (#37106103)
Has anyone ever encountered a real world scenario where you reached <h6>?
Re:A Blog Post with Every HTML Element by graypegg on Saturday August 12, 2023 @11:19PM (#37106376)
Yep! 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.

Re:A Blog Post with Every HTML Element by zirror on Sunday August 13, 2023 @07:10AM (#37108796)
Yes, specs and other technical documents. For example, the html spec[1] itself.

[1]: https://html.spec.whatwg.org/#link-type-next

Re:A Blog Post with Every HTML Element by Biganon on Sunday August 13, 2023 @07:58AM (#37109063)
I made a web version of a huge book written by my former professor/boss. It definitely used 6 heading levels, maybe even more.
Re:A Blog Post with Every HTML Element by dsego on Sunday August 13, 2023 @09:45AM (#37109990)
One of many things that irk me, like why limit to 1-6 instead of allowing an attribute for arbitrary size, eg <h level=15>
Re:A Blog Post with Every HTML Element by extra88 on Sunday August 13, 2023 @11:17AM (#37110771)
You 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.
Re:A Blog Post with Every HTML Element by runarberg on Sunday August 13, 2023 @11:28AM (#37110867)
They 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-ou...

Re:A Blog Post with Every HTML Element by throwaway18533 on Sunday August 13, 2023 @07:25PM (#37115649)
XHTML 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-structur...