4

Do the below formatted/styled URLs (links) placed in a HTML list not work due to mixing two different markup formats when composing a post?

  • [Composting Council of Canada][1]
  • [Create Your Own Compost Pile][2]
  • [Making and Using Compost][3]
  • [US Composting Council][4]
3

If, while typing out your post, you click the little question-mark that appears above and to the right, you'll get a handy-dandy Markdown reference. Clicking on HTML provides this illuminating text:

Block-level HTML elements have a few restrictions:

  1. They must be separated from surrounding text by blank lines.
  2. The begin and end tags of the outermost block element must not be indented.
  3. Markdown can't be used within HTML blocks.

(emphasis mine)

So you can use whatever links you want, if you use a Markdown-style list (wanna know how? Go back to the Markdown reference and select "Lists"!) but if you use a HTML list (<ul></ul> or <ol></ol>) you'll have to use HTML links (<a></a>) within it.

It occurs to me at this point that some readers might not know how to distinguish between span-level HTML and block-level HTML... Span-level doesn't necessarily end up in a separate paragraph (bold, italics, links...) while block-level will (lists, code blocks, quotes...)

  • Thank you for your detailed answer, it is much appreciated. – Mike Perry Jul 4 '11 at 16:25
2

Two possibilities:

  1. You may be running into a limit based on your rep. I think low-rep users can only have a couple of links per post to prevent spammy answers. Once you get a few more upvotes I think the number of links you can include increases. At the moment I can't find a reference to this limitation.

  2. There appears to be a bug related to mixing link types. I can't find a reference to it, but in a comment on this answer, Jeff Atwood mentions a bug that balpha says will be fixed in the next build.

This HTML list:

  • [example 1](http://example.com)
  • [example 2][1]
  • example 3

has the three kinds of links I can figure out how to add. They all render ok until I add the "</ul>" on the end of the list, and then the markdown links don't work. At any rate, if this isn't already a known bug, you would be best to report it at meta.SO instead of here.

FWIW, if you want to make bullets, markdown is easier than HTML. Just put "*" at the start of the line and you'll get a UL.

  • I don't think #1 is the problem (at east in my case), as I was able to post those 4 links in this post: gardening.stackexchange.com/questions/1088/… – Mike Perry Jul 3 '11 at 22:38
  • #2 might be relevant in my case or it could be as simple as you can't use mixed markup formats to construct the kind of list I was after creating. I honestly don't know, hence posting my question here... – Mike Perry Jul 3 '11 at 22:41
  • @Mike - Ok, then the rep threshold for links must be low. My guess is #2. – bstpierre Jul 4 '11 at 4:02
  • FWIW, if you want to make bullets, markdown is easier than HTML. Just put "*" at the start of the line and you'll get a UL. <-- Thank you, I did stumble into that easier (correct) solution myself while playing around with lists containing URLs. And thank you for your detailed answer, it's much appreciated. – Mike Perry Jul 4 '11 at 16:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .