counter-reset: counter-name /* Set counter-name to 0 */
counter-reset: counter-name -1 /* Set counter-name to -1 */
counter-reset: counter1 1 counter2 4 /* Set counter1 to 1, and counter2 to 4 */
counter-reset: none /* Cancel any reset that could have been set in less specific rules */
The name of the counter to reset.
The value to reset the counter to on each occurrence of the element. Defaults to 0 if not given.
Is a keyword indicating that no counter reset is to be performed. It can be used to hide counter-reset defined in less specific rules.
You may specify as many counters to reset as you want, each separated by a space.
counter-reset: chapter section 1 page;
/* Sets the chapter and page counters to 0
and the section counter to 1. */
Thanks! Please check your inbox to confirm your subscription.
If you haven’t previously confirmed a subscription to a Mozilla-related newsletter you may have to do so. Please check your inbox or your spam filter for an email from us.
Why does MDN look different?
MDN is changing to focus just on documenting web technologies. All the same great content is still here; we’re just changing some visual elements and navigation, to help you more quickly find the web technology docs you’re looking for.
But don’t worry, MDN and Mozilla are still together! In fact, we're updating MDN’s look to reflect Mozilla's new logo and colors.