counter-set
Widely availableSince 202396% of users
Sets a CSS counter to a specified value. Unlike 'counter-reset', which starts a new scope, 'counter-set' modifies the value of an existing counter within the current scope.
What's modern
From web-features, MDN's browser data and our snippets, checked dailyModernIn every major browser since December 2023. Widely available since June 2026.
See how modern your own CSS is.Check your CSS →
Quick facts
- Initial value
none- Inherited
- No
- Applies to
- all elements
- Animation type
- byComputedValueType
Quick example
.special-item {
/* Hard-sets the 'item-num' counter to 99 */
counter-set: item-num 99;
}Values
nonecounter-set browser support
BaselineWidely availableThis feature is well established and works across many devices and browser versions. It has been available across browsers since 2023.Safe to use without fallbacks.
Usage96%of people can use this4% use a browser without it.
Browsers
85+
68+
17.2+
85+Mobile
85+Android
68+Android
17.2+iOS