Markdown Bullet Lists or UL Lists

November 22, 2019
web

Here is a quick guide to creating bullet lists, also known as ul lists or unordered lists with Markdown.

You can use * or -

As long as you start the line with a * or a - markdown will interpret that as a list item. So the following markdown:

* One
* Two

Will produce a bullet list like this:

  • One
  • Two

As already mentioned we can use a - to start an unordered list in Markdown as well:

- One
- Two

Will produce the same list as above.

What about nested bullet lists?

To create a nested UL list just indent the line with a tab or 3-4 spaces. For example the following markdown:

* One
* Two
    * Three
        * Four

Will render as the following:

  • One
  • Two
    • Three
      • Four

Can you Mix * and -?

You certainly can, the following will render the same list nested bullet list as above:

- One
- Two
    * Three
        * Four

What about Numbered Lists?

You can do numbered lists by prefixing each line with incrementing numbers followed by a period. For example:

1. One
2. Two

Results in an ordered list (OL):

  1. One
  2. Two

That's pretty much all I know about markdown lists, did I miss anything?


Like this? Follow me ↯


This entry was:

Comments

I would add that ordered lists can have an optional start argument that is useful when you want to break out of a list to include other data elements and then resume the same lost with a new ol.
One nice thing about ordered lists in markdown: you don't have to use sequential numbers. You can use the same number repeatedly, have gaps between numbers, or random numbers. It will render as 1, 2, 3, etc. automatically.

Post a Comment




  






Foundeo Inc.