We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

counter-reset Redirect 1


The counter-reset CSS property is used to reset CSS Counters to a given value.


Formal syntax: [<user-ident> <integer>?]+ | none
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 */

counter-reset: inherit


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.


h1 {
  counter-reset: chapter section 1 page;
  /* Sets the chapter and page counters to 0
     and the section counter to 1. */


Specification Status Comment
CSS Lists and Counters Module Level 3 Working Draft No change.
CSS Level 2 (Revision 1) Recommendation Initial definition.

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 2.0 1.0 (?) 8.0 9.2 3.1 (?)
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support 2.1 25.0 (?) 10 (?) 10.0 3.2

See also

Document Tags and Contributors

Last updated by: Sheppy,