Styling Ordered List Numbers in CSS


Customize the appearance of numbers in ordered lists.

Source Code

ol {
    counter-reset: list-counter;
    list-style: none;
}
ol > li:before {
    counter-increment: list-counter;
    content: counter(list-counter) ". ";
    font-weight: bold;
    color: red;
}
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments