The counter-reset property creates one or more named CSS counters and sets each to a starting value. A bare name starts at 0. After that, use counter-increment and print the value with content and counter().
The initial value is none. It is not inherited. Put the reset on a parent so every child shares the same counter scope.
Baseline · Widely available.
Basic named counters are not deprecated. The reversed() form is limited (mainly Firefox) — use a high start plus a negative increment for countdown in all browsers.
Name tip.
counter-reset creates and initializes a counter. counter-set jumps an existing counter to a value. Prefer reset for the first setup step.
Put counter-reset on a parent. Resetting on each child keeps the printed value stuck near the start.
names
Reset is not the same as set
counter-reset creates and initializes. counter-set assigns an absolute value later. Use the right one for the job.
limited
reversed() is not widely supported
For countdown everywhere, set a high start with counter-reset and use a negative counter-increment instead of reversed().
lists
list-item is a built-in counter
Ordered lists already use list-item. You can reset it (similar to start on <ol>), but custom names are clearer for learning.
Compatibility
Browser Support
counter-reset is a browser CSS property for creating counters. Node.js, Deno, and Bun do not apply it.
✓ Baseline · Widely available
counter-reset
Basic named counters are supported in all modern browsers and Internet Explorer 8+. reversed() remains limited (mainly Firefox).
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-resetWidely supported
Bottom line: Safe for everyday numbering with counter-increment and content: counter(name). Avoid relying on reversed() for cross-browser work. It is not a runtime API.
Remember
Key Takeaways
Role: create named counters and set their starting integers.
Default start: a bare name begins at 0. The first increment usually prints 1.
Workflow: reset on a parent, increment on items, print with content: counter(name).
Initial value:none. Not inherited. Prefer a new reset to restart a nested group.
One line:counter-reset creates the counter — then increment and content make the numbers appear.
Frequently Asked Questions
It creates one or more named CSS counters and sets each to a starting integer. If you omit the integer, a regular counter starts at 0.
The initial value is none, which means no counters are created or reset on that element.
counter-reset creates and initializes a counter. counter-set jumps an existing counter to an absolute value. Despite the names, reset is usually the create step.
A bare name starts the counter at 0. The first counter-increment then adds 1, so the first printed value is usually 1.
Yes. List names with optional integers, separated by spaces, for example counter-reset: chapter section 2.
Basic counter-reset is Baseline and widely available in modern browsers and Internet Explorer 8+. The reversed() form has limited support (mainly Firefox). It is a browser CSS property, not a Node.js feature.