CSS Counters for Ordered Lists


Use CSS counters to create custom numbering styles for ordered lists or headings.

Source Code

body {
    counter-reset: section; /* Create a section counter */
}
h2::before {
    counter-increment: section; /* Increment the counter */
    content: "Section " counter(section) ": ";
}
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments