Markdown Nested List

August 7, 2017
Support mixing of ordered list (number) with unordered list.

Nested list

Markdown support multi level of nested list. It’s recommended to use 4 spaces for nested list. You can use either -, * or + for unordered list.

- Item 1
- Item 2
    - Nested Item 1
        - Level 3 Item 1
        - Level 3 Item 2
    - Nested Item 2
    - Nested Item 3
- Item 3      

Output:

  • Item 1
  • Item 2
    • Nested Item 1
      • Level 3 Item 1
      • Level 3 Item 2
    • Nested Item 2
    • Nested Item 3
  • Item 3

Mixing nested list type

You can mix ordered list (number) with unordered list.

1. Item 1
    - Nested Item 1
    - Nested Item 2
2. Item 2
    1. Nested Number 1
    2. Nested Number 2
3. Item 3
4. Item 4    

Output:

  1. Item 1
    • Nested Item 1
    • Nested Item 2
  2. Item 2
    1. Nested Number 1
    2. Nested Number 2
  3. Item 3
  4. Item 4
This work is licensed under a
Creative Commons Attribution-NonCommercial 4.0 International License.