Why are there even tight lists?

I don’t really see the use of having “tight” versus “loose” lists.

I can see that it creates a lot of trouble in bloating the specs (and the users comprehension of it) about where to put blank lines (or rather how they are interpreted).

Am I wrong to think that the difference between

  • <li>example</li> and
  • <li><p>example</p></li>

is not really semantic, but more of a styling problem?! The only difference I see is the blank space after the paragraph. Should I use the blank lines in code to determine the spacing? I don’t see any meaningful difference between a tight and a loose version of “- oranges, - apples, - bananas”.

Wouldn’t it be possible to just define the styling of the paragraph to not contain bottom margin?

Or let me ask the other way around: if the <p> is semantically unnecessary as in <li><p>example</p></li>, why not leave it away and rather add a class="loose" to the <ul> or <ol> for the styling?

Yes. There is a meaningful difference between a list of items and a list of paragraphs.

It’s partly a backwards-compatibility issue, since Gruber’s original Markdown had a distinction between tight and loose lists that was realized this way (presence or absence of p tags). You’re right that in principle one could, e.g., always use p tags and add a class to the list. But there’d still be reason to let this distinction be triggered by a feature of the source text that didn’t look like markup – such as the spacing between list items.

2 Likes

Your examples don’t really show a difference, but some lists contain items with multiple paragraphs. If a list item contains multiple paragraphs, then you need to have a paragraph’s worth of space between the items and between the intra-item paragraphs, otherwise it looks really dumb.

You could switch to “loose lists” only when a list item has more than one paragraph in it, but it’s not obviously better than the current situation.