YouTip LogoYouTip

Pr Gen Counter Increment

## Syntax ```css counter-increment: none | [] | [] ... ``` ## Values - `none`: No counter is incremented. - ``: The name of the counter to increment. - ``: The value to increment by, default is 1. ## Example ```html ol { counter-reset: section; list-style-type: none; } li::before { counter-increment: section; content: counters(section, ".") " "; }
  1. Item 1
  2. Item 2
  3. Item 3
``` In the example above, we use `counter-increment` to increment a counter named `section`, and display the counter value before each list item using the `counters()` function. ## Browser Support All major browsers support the `counter-increment` property. ## Related Links - ( - ( - ( ## Next Section (
← Pr Gen Counter ResetSel Selection β†’