Decimal Leading Zero Marker for List Items
To set decimal numbers with leading zero as marker for the list items in a list using CSS, set list-style-type
property for the list with the decimal-leading-zero
value as shown in the following.
ol { list-style-type: decimal-leading-zero; }
Examples
1 Decimal leading zero as marker for list items
In the following example, we take an ordered list and specify decimal-leading-zero
as marker for the list items.
index.html
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <style> ol { list-style-type: decimal-leading-zero; } </style> </head> <body> <ol> <li>Apple</li> <li>Banana</li> <li>Cherry</li> <li>Mango</li> </ol> </body> </html>
Conclusion
In this CSS Tutorial, we learned how to use CSS list-style-type
property to set decimal leading zero as marker for list items, with examples.