How to Style an Ordered List with Lowercase Roman Numbers in CSS

Learn how to style an ordered list with lowercase roman numbers in CSS.

To make an ordered list in HTML, you use:

  • The <ol> tag to define your ordered list element.
  • The <li> tag to define your list item elements.

Example:

<ol>
  <li>List item</li>
  <li>List item</li>
  <li>List item</li>
</ol>

By default, ordered list items are styled with regular decimal numbers:

  1. List item
  2. List item
  3. List item

The default ordered list with decimal numbers, comes from the User-Agent Stylesheet (UAS) which is built-in, in all browsers. It’s defined with the CSS property: list-style-type: decimal;

How to add lowercase roman numbers with CSS

To create a list with lowercase roman numbers you need to override the default decimal style numbers, with the CSS property list-style-type:

ol {
  list-style-type: lower-roman;
}

Lowercase roman numbers example:

  1. List item
  2. List item
  3. List item

Has this been helpful to you?

You can support my work by sharing this article with others, or perhaps buy me a cup of coffee 😊

Kofi

Share & Discuss on