4 ms·
This article could use a LOT of source links. Not because I believe points are wrong, but because if the author wants to rant that no one knows/has heard of th
by Arainach 2y ago
This article could use a LOT of source links. Not because I believe points are wrong, but because if the author wants to rant that no one knows/has heard of things, why would anyone know what they're talking about?
>The number of times I’ve seen numbers written inside of a <li> that’s inside of a <ul> — instead of just using an <ol> — is deeply disturbing.
I've been reading and writing HTML since the 90s and off the top of my head can't recall ever seeing <ol>. Why is it better? For screen readers? A sentence to illustrate goes a long way.
- jiggawatts 2y agoTIL: https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_ol_type_all_css https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_ol...
- manuelmoreale 2y agoSince you're exploring lists: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_counter_styles/Using_CSS_counters https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_counter...
- MrVandemar 2y ago> <ol>. Why is it better? For screen readers? A sentence to illustrate goes a long way. It's better because it means it's a list of something in order, as opposed to a definition list or an unordered list. The distinctions are important. It means, for example, that you can meaningfully skip to the middle of an ordered list of the 100 tallest buildings, and be guaranteed to be looking at the 50th tallest building.
- tstrimple 2y agoYou're technically not guaranteed to have ordering. You can put an ordered list into any order you want. But semantically it indicates that the order of the list matters. I like the semantic model, but it can easily be abused and not mean anything at all.
- itronitron 2y agoThe author writes >> I’ve seen numbers written inside of a <li> that’s inside of a <ul> — instead of just using an <ol> An ordered list <ol> automatically adds a number to each list item indicating its position in the order in the list which would save developers the effort of adding code to insert numbers into ordinary list items in an unordered list.
- manuelmoreale 2y ago> I've been reading and writing HTML since the 90s and off the top of my head can't recall ever seeing <ol> I have to ask: is this /s? Are you really saying you never seen an ordered list in 30 years working on the web? How about <dl> ? If you’re not joking then it’s honestly wild to me.
- Mathnerd314 2y agoIt is basic Markdown... maybe they never investigated the HTML Markdown produces on GitHub and so on? <ol> does seem hard to avoid.
- manuelmoreale 2y agoDidn’t markdown come out in the early 2000s? So you’d have to try HARD to not see a <ol> especially because pre html5 there were even fewer tags available.
- necovek 2y agoWhat? How could you have been writing HTML since the 90s and not see all those examples of OLs with numbered items, including lowercase roman numerals or uppercase letters? Somehow, even if I never used roman numerals, that example sticks in my head (esp the lowercase). Anyway, if you cared deeply about content in the 90s, you might have focused on the semantic meaning behind tags (I've also looked a lot at other SGML and later XML based formats like TEI, DocBook...), tried to strictly decouple presentation (CSS) from the HTML (content), and be annoyed that the CSS box model never supported nice content-related flow features like TeX did since the 80s (and still doesn't). Now, don't get me wrong, I wasn't some wizard — I was simply an easily impressed (with things having some meaning) high-schooler around that time :)
- tobyhinloopen 2y agoIt’s like asking why you would use a list anyway and not just a bunch of BR or P tags
- doubloon 2y agoJust wrap everything in PRE and do ascii dumps.
- tobyhinloopen 2y agocontent-type: text/plain; charset=utf8 Who needs HTML