MDUtil

Lists in Markdown

Start lines with - for a bulleted list or 1. for a numbered one. This guide covers nesting, start numbers, paragraphs and code inside items, and why a list sometimes restarts.

Quick answer

How do you make a list in Markdown?

For a bulleted list, start each line with -, * or + and a space. For a numbered list, start each line with a number and a period, such as 1.. Indent an item to nest it under the one above.

Markdown
- Milk
- Eggs
- Bread

1. Preheat the oven
2. Mix the batter
3. Bake for 30 minutes

Result

  • Milk
  • Eggs
  • Bread
  1. Preheat the oven
  2. Mix the batter
  3. Bake for 30 minutes

List syntax and examples

Lists follow a few simple rules about markers and indentation. These examples show each one.

Bulleted lists

-, * and + all make the same list. Use one marker throughout: switching to another starts a new list.

Markdown
- Plan the trip
- Book the flights
- Pack the bags

Result

  • Plan the trip
  • Book the flights
  • Pack the bags

Numbered lists

Only the first number counts; the items are numbered in order, so every item can be 1., which keeps the list correct when you reorder it.

Markdown
1. Preheat the oven
1. Mix the batter
1. Bake for 30 minutes

Result

  1. Preheat the oven
  2. Mix the batter
  3. Bake for 30 minutes

Starting from another number

The first number sets where counting starts, so a list can pick up after a break.

Markdown
3. Third step
4. Fourth step

Result

  1. Third step
  2. Fourth step

Nested lists

Indent a sub-item to line up with the text of the item above: two spaces under -, three under 1..

Markdown
1. Fruit
   - Apples
   - Pears
2. Vegetables
   - Carrots
     - Orange ones
     - Purple ones

Result

  1. Fruit
    • Apples
    • Pears
  2. Vegetables
    • Carrots
      • Orange ones
      • Purple ones

Paragraphs and code in an item

Leave a blank line and indent follow-up text or code to the item's text.

Markdown
1. Install Pandoc:

   ```bash
   brew install pandoc
   ```

2. Check the version:

   ```bash
   pandoc --version
   ```

Result

  1. Install Pandoc:

    brew install pandoc
    
  2. Check the version:

    pandoc --version
    

A number that is not a list

A line that starts with a number and a period becomes a list. A backslash before the period keeps it as text.

Markdown
1986\. A great year.

1986. A great year.

Result

1986. A great year.

  1. A great year.

Lists in popular apps

Lists work almost everywhere. Editors such as Notion turn the markers into list blocks as you type.

AppSupportNotes
GitHub / GitLabSupportedAll three bullet markers, numbered lists and nesting. The start number is kept.
DiscordSupported-, * and 1. lists work in messages.
SlackDiffersTyping * or 1. and a space starts a list in the message box.
ObsidianSupportedLists and nesting work; Tab indents an item.
NotionSupportedTyping - or 1. and a space starts a list block.
RedditSupportedBulleted, numbered and nested lists work.

Questions and answers

How do I make a bulleted list in Markdown?

Start each line with -, * or + followed by a space. All three give the same <ul> list; use one of them throughout.

Why does my numbered list restart at 1?

Something between the items ended the list, usually text or code that is not indented under an item. Indent it to line up with the item's text, or start the next list with the number you want, such as 4..

How do I nest lists?

Indent the sub-item to line up with the parent's text: two spaces under - , three under 1. . Four spaces also work in most renderers.

Do the numbers in a numbered list matter?

Only the first one. It sets where counting starts; the rest are numbered in order, so writing 1. for every item is fine.

How do I put two lists one after the other?

Use a different marker for the second list, - and then *, or put a line of text or an HTML comment <!-- --> between them.

How do I add a paragraph or code block inside a list item?

Leave a blank line and indent it to the item's text: two spaces under - , three under 1. .

How do I start a line with a number without making a list?

Put a backslash before the period: 2024\. A good year.

What is the difference between a tight and a loose list?

Items with no blank lines between them form a tight list. A blank line between any two items makes the whole list loose: each item becomes a paragraph, with more space between items.