logoalt Hacker News

bulatbtoday at 5:59 PM2 repliesview on HN

A <ul> is a list of things whose order makes no difference to its meaning. Rearranging a <ul> would change the presentation, not the information. Rearranging an <ol> would change both.

  <ul> Players
    <li> Alice
    <li> Bob
    <li> Carol
  </ul>

  <ol> Leaderboard
    <li> Bob
    <li> Alice
    <li> Carol
  </ol>

Replies

shermantanktoptoday at 7:42 PM

Exactly. “Unordered” implies “reordering doesn’t change meaning.” And yet that’s already implicit in the bullets (vs numbers).

So is it a decoration hint? Or is it actually semantic? And what system is interpreting the semantics rather than the visual presentation?

show 1 reply
bulatbtoday at 8:08 PM

Too late to edit now, but I should mention putting titles in a list like that isn't valid. It's just to shorten the example.