Ordered Lists & Nested Outlines0%

Ordered Lists & Nested Outlines

Beginner12 min readUpdated: Jul 11, 2026
Study Materials

Ordered lists represent numbered, sequential steps where order matters—such as installation tutorials, recipe steps, or algorithmic procedures.

Markdown Syntax AnatomyClick to Zoom
Markdown Syntax Anatomy

1. Basic Ordered List Syntax

To create an ordered list, prefix each line with a number followed by a period (.) or parenthesis ()), and a space:

Markdown
1. Clone the repository
2. Install dependencies with npm
3. Run the development server
  • HTML Output: <ol><li>Clone the repository</li><li>...</li></ol>

2. The Auto-Numbering Magic of Markdown

One of Markdown's greatest conveniences is that you do not need to manually calculate numbers! The parser will automatically re-number the items consecutively on render:

Markdown
1. First step
1. Second step
1. Third step
1. Fourth step

Rendered Output in Browser:

  1. 1
    First step
  2. 2
    Second step
  3. 3
    Third step
  4. 4
    Fourth step
Why write with all 1.? If you later insert a new step in the middle of a 20-step tutorial, you do not need to manually renumber the remaining 19 steps!

3. Starting at an Offset Number

In CommonMark and GFM, the first number determines the starting index of the HTML list (<ol start="X">):

Markdown
10. Step Ten
11. Step Eleven
12. Step Twelve

This will render starting from number 10, rather than 1!


4. Multi-Level Mixed Outlines

You can freely mix ordered and unordered lists to build complex hierarchical outlines:

Markdown
1. Project Setup
- Initialize git (`git init`)
- Create `.gitignore`
2. Backend Architecture
- Database schemas
1. Users table
2. Orders table
- API routes
3. Deployment
- Configure Docker container
- Deploy to production

Multiple Choice Questions

1. What HTML tag is generated by an ordered list in Markdown?

A. <ul> B. <ol> C. <li> D. <dl> Answer: B Explanation: Ordered numbered lists compile to an HTML <ol> (Ordered List) container.


2. If you write an ordered list with '1. Apple', '1. Banana', '1. Orange', how will it render in the browser?

A. All items will be numbered 1. B. It will automatically render consecutively as 1. Apple, 2. Banana, 3. Orange C. It will throw a syntax error D. It will convert to bullet points Answer: B Explanation: Markdown parsers automatically compute consecutive sequential numbers regardless of the actual digits typed in source.


3. How can you start an ordered list from the number 5 instead of 1?

A. Type 'start=5' on top B. Begin the first item with '5.' (e.g. '5. Fifth item') C. Press Tab five times D. You cannot change the starting number in Markdown Answer: B Explanation: In CommonMark and GFM, the first number in the list sets the HTML <ol start="..."> attribute.


4. How do you indent a nested ordered list beneath a parent list item?

A. Press Spacebar 2 or 4 times B. Put a hash (#) in front C. Insert an HTML <table> D. Type 'nested' Answer: A Explanation: Indenting child items by 2 or 4 spaces creates a subordinate nested list level.


5. Besides a period ('1.'), which other punctuation mark is valid after a number in CommonMark ordered lists?

A. Right parenthesis ('1)') B. Comma ('1,') C. Semicolon ('1;') D. Question mark ('1?') Answer: A Explanation: CommonMark permits both a period (1.) and a right parenthesis (1)) as ordered list delimiters.


Next Lesson

Task Lists & Interactive Checkboxes

Continue learning with hands-on practice, examples, and exercises in the upcoming topic.

Practice Quiz

Test your understanding of this lesson with 5 questions. Each question has one correct answer.

PrevNext