Ordered lists with Roman numerals or letters

published Sep 19, 2011

One of our authors asked me how to do an ordered list with Roman numerals or letters instead of normal numbers. You know, like this:

  1. unus, una, unum
  2. uno, dos, tres, quatorze
  3. duo, duae, duo
  4. tres, tres, tria

Or like this

  1. is for Astronaut
  2. is for Betelgeuse
  3. is for Comet

Here’s how you do it:


In HTML, you set the class of the list to lower-roman, upper-roman, lower-alpha, upper-alpha or decimal.

For example:

<ol class="upper-roman"> <li>is one</li> <li>is two</li> <li>is three</li> </ol>

will give you

In Markdown

In Markdown, you just write what you want.

i. one ii. two iii. three

will result in

You can also change the punctuation

a) is for apple b) is for bats c) is for carrots

gives you

a) is for apple b) is for bats c) is for carrots

Note that you don’t have to change the numbers or letters and the order of them doesn’t matter

a. is for apple a. is for aardvark a. is for amazon

gives you

  1. is for apple
  2. is for aardvark
  3. is for amazon

blog comments powered by

Originally published at leanpub.com.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.