How do I put a hyperlink inside a list in Markdown on GitHub Pages?

27.2k Views Asked by At

I have tried the following syntax to make a Markdown list item on a GitHub page of mine a hyperlink:

  1. [Caption]: https://example.com
  2. Another list item

Contrary to intuitive expectations it renders into the following HTML code

<ol>
  <li></li>
  <li>Another list item</li>
</ol>

How can this possibly be fixed? Is there a correct syntax for this? My intention was to create a clickable list of sources of the information used to write the article and put it in the bottom part of it.

2

There are 2 best solutions below

0
On BEST ANSWER

It should be:

  1. [Caption](https://example.com)
  2. Another list item
0
On

From GitHub's "Mastering Markdown":

Links

http://github.com - automatic!
[GitHub](http://github.com)

Mastering Markdown]

https://guides.github.com/features/mastering-markdown/#Links