counter-increment, counter-reset | NN n/a IE n/a CSS 2 |
Inherited: No | |
These attributes control the numbering sequence of a CSS counter used for generated content (see the content attribute). The counter-increment attribute sets the amount (and direction) of change each time the counter is accessed during rendering. The counter-reset attribute lets you set the counter to a specific number (default of zero). |
|
CSS Syntax | |
counter-increment: counterID [ posOrNegInteger ] | none counter-reset: counterID [ posOrNegInteger ] | none |
|
Value | |
A counterID is an identifier assigned to a content:counter(counterID) style attribute. The optional integer value is space-delimited after the counterID. You can combine multiple counter IDs in the same style attribute by stringing together space-delimited pairs of ID and integer values. |
|
Initial Value | |
none |
|
Example | |
h1 {counter-reset:subSection} |
|
Applies To | |
All elements. |