counter-set
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.
Quick example
.special-item {
/* Hard-sets the 'item-num' counter to 99 */
counter-set: item-num 99;
} Quick facts
Initial value
noneInherited
No
Applies to
all elements
Animation type
byComputedValueType
Values
none counter-set Browser Support
Newly available Since 2023 93% global usage
Since 2023 this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
Works in all modern browsers. May need a fallback for older browsers.
85+
68+
17.2+
85+