Markdown Ordered List: Numbered Lists and Sub-lists

To create an ordered list in Markdown, start each line with a number followed by a period and a space (1. Item). You can use any numbers or all 1.s; the renderer automatically calculates sequential numbers.

Syntax Code Snippet
1. First item
2. Second item
   1. Sub-item indented by 3 spaces
   2. Another sub-item
3. Third item
Rendered HTML Output Preview
  1. First item
  2. Second item
    1. Sub-item indented by 3 spaces
    2. Another sub-item
  3. Third item

Platform Compatibility & Differences

GitHub (GFM):

Supported. Requires 3 or 4 spaces of indentation for nested sub-lists.

Discord Chat:

Discord supports ordered lists with `1. ` syntax.

Reddit:

Supported with numbers and a period.

Jupyter Notebooks:

Supported in Markdown cells.

How to Use Markdown Ordered List

  1. Copy the ready-to-use Ordered List syntax snippet below.
  2. Inspect the rendered live preview in both light and dark themes.
  3. Review platform compatibility differences for GitHub, Discord, Reddit, and Jupyter notebooks.
  4. Check common pitfalls and copy formatted snippets directly.

Practical Examples

Ordered List Syntax Pattern

Ordered lists organize sequential steps, rankings, or numbered procedures.

Input:
1. First item
2. Second item
   1. Sub-item indented by 3 spaces
   2. Another sub-item
3. Third item
Output:
Rendered visual format

Common Mistakes & Troubleshooting

  • Indenting sub-items with only 1 space (use at least 3 spaces or 1 tab).
  • Forgetting the space after the period.

Frequently Asked Questions

Do I have to manually number items 1, 2, 3?

No. Markdown automatically renumbers items in order, so you can write `1. ` for every item and it will render correctly as 1, 2, 3.