The counter-increment
property in
This property is used with the
content
and thecounter-reset
property.
counter-increment: none|id|initial|inherit;
none
: This is the default value, and by using this, we can not change the counter’s value.
id
: It is used to specify which counter has to be incremented and also to specify that how much we want to increment. The default increment value is 1.
initial
: This sets the value to its default value.
inherit
: This inherits property from its parent value.
The following is the basic counter-increment
property:
In this example, we can see that we have made the counter on Employee. So, when we add the details of any employee, it is automatically incremented by 1.