The counter-increment property increases or decreases one or more named CSS counters. If you write only a counter name, that counter goes up by 1. A negative integer counts down.
Set a high start.counter-reset: section 4 begins at 4.
Subtract on each item.section -1 decreases the counter by one.
Print after the change. The first heading shows 3, then 2, then 1.
Freeze vs cancel. Use section 0 to skip one item, or none to block every counter on that rule.
Edge Cases & Pitfalls
If the numbers look wrong, one of these is usually why.
display
Increment alone shows nothing
Counters are invisible until you print them with content and counter() on a pseudo-element.
none
none cancels every counter
To freeze only one name, use counter-increment: section 0. none blocks all increments on that element.
order
Reset and increment are different jobs
counter-reset sets the starting value. counter-increment changes it later. Putting reset on every item restarts the count.
scope
Missing reset still creates a counter
Increment can create a counter automatically, often starting near 0. Prefer an explicit counter-reset so the first printed value is predictable.
set
counter-set is not an increment
counter-set jumps to an absolute value. Use increment when each match should add or subtract a step.
Compatibility
Browser Support
counter-increment is a browser CSS property for automatic numbering. Node.js, Deno, and Bun do not apply it.
✓ Baseline · Widely available
counter-increment
Supported in all modern browsers and Internet Explorer 8+. CSS counters have been available across browsers for a long time.
99%Counter support
Google Chrome2+
Full support
Mozilla Firefox1+
Full support
Apple Safari3+
Full support
Microsoft Edge12+
Full support
Opera9.2+
Full support
Samsung Internet1+
Full support
Internet Explorer8+
Full support
counter-incrementWidely supported
Bottom line: Safe for everyday numbering with counter-reset and content: counter(name). It is not a runtime API.
Remember
Key Takeaways
Role: add or subtract from named CSS counters on matching elements.
Default step: a bare name increases by 1. Use an integer for other steps.
Display: print with content: counter(name) on ::before or ::after.
Initial value:none. Not inherited. Prefer 0 to freeze one counter.
One line:counter-increment moves the counter — reset first, increment on each item, then print with content.
Frequently Asked Questions
It increases or decreases one or more named CSS counters by the given integers. If you omit the integer, the counter increases by 1.
The initial value is none, which means no counters are changed on that element.
Use content with the counter() function on ::before or ::after, for example content: counter(section). Pair that with counter-reset for a clear starting value.
Use none only when you want to cancel every increment. To freeze one named counter, set its integer to 0, such as counter-increment: section 0.
Yes. If the named counter does not exist yet, CSS creates it. Still prefer counter-reset when you need a predictable start value.
It is Baseline and widely available in all modern browsers and Internet Explorer 8+. It is a browser CSS property, not a Node.js feature.