Skip to content

Instantly share code, notes, and snippets.

@sogaiu
Last active May 6, 2025 05:39
Show Gist options
  • Save sogaiu/457392f57c94ab1748235cfb69d8e8d6 to your computer and use it in GitHub Desktop.
Save sogaiu/457392f57c94ab1748235cfb69d8e8d6 to your computer and use it in GitHub Desktop.
html (and markdown-ish) list item illusions

exhibit a - tight

  • one item
  • another item
  • third item

exhibit b - pseudo-loose (actually three lists)

  • one item
  • another item
  • third item

exhibit c - loose

  • one item

  • another item

  • third item

loose because at least two items are separated by a blank line

exhibit d - loose

  • one item

    part of one item

  • another item

  • third item

loose because an item (first one) has at least two block-level elements separated by a blank line

exhibit e - sublist is loose (but not top-level list)

  • A
    • A.1

    • A.2

    • A.3

  • B
  • C

sublist is loose because A has at least two block-level elements (A.1 and A.2) separated by a blank line


source:

### exhibit a - tight
* one item
* another item
* third item

### exhibit b - pseudo-loose (actually three lists)
<ul>
  <li>one item</li>
</ul>
<ul>
  <li>another item</li>
</ul>
<ul>
  <li>third item</li>
</ul>

### exhibit c - loose
* one item

* another item

* third item

loose because at least two items are separated by a blank line

### exhibit d - loose
* one item

  part of one item
* another item
* third item

loose because an item (first one) has at least two block-level elements separated by a blank line

### exhibit e - sublist is loose (but not top-level list)
* A
  * A.1

  * A.2
  * A.3
* B
* C

sublist is loose because `A` has at least two block-level elements (`A.1` and `A.2`) separated by a blank line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment