1. Home
  2. Computing & Technology
  3. Web Design / HTML

counter-reset

By Jennifer Kyrnin, About.com

counter-reset Description:

The counter-reset property defines the counters and what they should be reset to. The default is 0.

counter-reset in CSS Versions:

counter-reset Syntax:

counter-reset: <identifier> <integer> | none | inherit

  • <identifier>
    Defines the element by id that should be reset.
  • <integer>
    Defines what the counter should be reset to. Default is 0;
  • none
    Do not reset the counter.
  • inherit
    The element should have the same counter-reset setting as the parent.

counter-reset Initial Value:

none

counter-reset Applies To:

All elements.

counter-reset Inheritance:

This property is not inherited.

counter-reset Browser Support:

counter-reset media type:

  • All

counter-reset Examples

Reset chapters to 0

<style>
div.chapter:after {
content: "Chapter: " counter(chapter);
counter-increment: chapter;
counter-reset: chapter;
}
</style>

Reset chapters to 10

<style>
div.chapter:after {
content: "Chapter: " counter(chapter);
counter-increment: chapter;
counter-reset: chapter 10;
}
</style>

counter-reset Special Notes:

  • Internet Explorer does not support this property.
  • Mozilla browsers do not support this property.

More counter-reset Information

Return to the Style Library

Explore Web Design / HTML

More from About.com

  1. Home
  2. Computing & Technology
  3. Web Design / HTML
  4. CSS
  5. Style Properties
  6. CSS Style Property: counter-reset

©2008 About.com, a part of The New York Times Company.

All rights reserved.