Markdown Coach

Markdown Nested Lists: How to Indent a List

Nested lists show items that belong under another item, like sub-tasks. Indent the inner items with spaces so they line up under the words of the item above.

The rule

To put a list inside a list item, start the inner item on a new line and indent it with spaces so it lines up under the words above: two spaces under "- ", three under "1. ".

You type

- Fruit
  - Apple
  - Pear
- Bread

You get

  • Fruit

    • Apple

    • Pear

  • Bread

Try it yourself

Make a bullet list: Snacks, with Crackers indented under it, then Water.

Live preview

More examples

You type

- Fruit
  - Apple
  - Pear
- Bread

You get

  • Fruit

    • Apple

    • Pear

  • Bread

Two spaces under a dash.

You type

1. Pack
   - Hat
   - Water
2. Leave

You get

  1. Pack

    • Hat

    • Water

  2. Leave

Three spaces under 1. (a bullet list inside a numbered one).

Common mistakes

You type

- Fruit
- Apple
- Pear

Shows as

  • Fruit

  • Apple

  • Pear

No indent, so everything stays on one level.

You type

1. Pack
 - Hat
2. Leave

Shows as

  1. Pack

  • Hat

  1. Leave

One space is not enough under 1.; the inner item needs to reach the word above it (three spaces).

Where it works

Everywhere. Four spaces or a tab also work in most apps.

Keep it, not just learn it

The full course has 22 skills on five islands, short Missions that check your answers, and reviews a few days later so it sticks. Free, no sign-up.

Practise this in the course