YouTip LogoYouTip

Prop Style Counterreset

# Style counterReset Property [![Image 8: Style Object Reference](#) Style Object](#) ## Example Change the counter-reset property: document.body.style.counterReset = "section"; [Try it Β»](#) * * * ## Definition and Usage The counterReset property creates or resets one or more counters. The counterReset property is often used together with the counterIncrement property and the content property. * * * ## Browser Support ![Image 9: Internet Explorer](#)![Image 10: Firefox](#)![Image 11: Opera](#)![Image 12: Google Chrome](#)![Image 13: Safari](#) The counterReset property is supported in all major browsers. **Note:** IE8 only supports the counterReset property if a !DOCTYPE is specified. * * * ## Syntax Return the counterReset property: _object_.style.counterReset Set the counterReset property: _object_.style.counterReset="none|_name number_|initial|inherit" ## Property Values | Value | Description | | --- | --- | | none | Default value. No counters are reset. | | _name_ | _name_ defines which counter should be reset. | | _number_ | _number_ sets the value to which the counter should be set each time the selector is encountered. The default reset value is 0. | | initial | Sets this property to its default value. See (#). | | inherit | Inherits this property from its parent element. See (#). | ## Technical Details | Default Value: | none | | --- | --- | | Return Value: | A String, representing the counter-increment property of an element. | | CSS Version | CSS2 | * * Style Object](#)
← Prop Style FlexProp Style Counterincrement β†’