CSS counter-reset Property

The counter-reset property in CSS is used to create or reset the CSS counter for elements. This property works together with counter-increment property and the content property.

The counter-reset property creates or resets one or more CSS counters.

CSS Syntax

counter-reset: none|name number|initial|inherit;
Property Values:
  • none: It is the default value. This value does not reset the counter.
  • name number: The value to reset the counter on each occurrence of the element. The default value is 0 if not specified.
  • initial: It sets the counter-reset property to its default value.
  • inherit: The element inherits the property from its parent element.

Supported Browsers:

  • Firefox: 52.0, 2.0 -moz-
  • Google Chrome: 50.0, 4.0 -webkit-
  • Internet Explorer: 10.0
  • Safari: 9.0, 3.1 -webkit-
  • Opera: 37.0, 15.0 -webkit-, 11.1

Example -