How to add HTML ordered list lower-alpha with right parentheses?

Spread the love

To add HTML ordered list lower-alpha with right parentheses, we set the content property.

For instance, we write

<ol>
  <li>Number 1</li>
  <li>Number 2</li>
  <li>Number 3</li>
  <li>Number 4</li>
  <li>Number 5</li>
  <li>Number 6</li>
</ol>

to add the ordered list.

Then we write

ol {
  counter-reset: list;
}
ol > li {
  list-style: none;
}
ol > li:before {
  content: counter(list, lower-alpha) ") ";
  counter-increment: list;
}

to set content to counter(list, lower-alpha) ") " to set the counter to letters.

Leave a Reply

Your email address will not be published. Required fields are marked *