How to Change Numbering Styles for Ordered ListsOrdered lists (<ol>) are usually numbered in XHTML output using numerals. If you want to change the numbering to alphabetical, follow these steps:
<ol>: The Ordered List elementThe <ol> HTML element represents an ordered list of items — typically rendered as a numbered list. Show
HTML Ordered Lists
❮ Previous
Next ❯
The HTML <ol> tag defines an ordered list. An ordered list can be numerical or alphabetical. The markup
The first thing we need to define is where the counter should be reset.custom-counter { counter-reset: section; }Now, the counter will start from 0. The value of the couter-reset property can be anything you want, it will be used for the counter-increment property later. Next, we need to add the CSS to auto increment the number of items.custom-counter li::before { counter-increment: step-counter; content: counter(step-counter); }In this code, we are telling the CSS to start incrementing for all li elements inside .custom-couter. The first li element will be numbered 1, the second will be numbered 2 and so on. We also use content property to show the number with the value counter(step-counter). And this is the final result
Start with 1.If you want to change any number in a list to 1, here’s how:
More about listsChange bullet indents Top of Page |