Begin ordered list from 0 in Markdown

Simply: NO

Longer: YES, BUT

When you create ordered list in Markdown it is parsed to HTML ordered list, i.e.:

# Table of Contents

0. Item 0  
1. Item 1  
2. Item 2

Will create:

<h1>Table of Contents</h1>
<ol>
  <li>Item 0</li>
  <li>Item 1</li>
  <li>Item 2</li>
</ol>

So as you can see, there is no data about starting number. If you want to start at certain number, unfortunately, you have to use pure HTML and write:

<ol start="0">
  <li>Item 0</li>
  <li>Item 1</li>
  <li>Item 2</li>
</ol>

Leave a Comment

tech