HTML Dog
Skip to navigation

CSS Property: counter-increment

Increments a named counter used by generated content.

Possible Values

ValueDescriptionExample
[identifier]Counter name. Counter will increase by 1 with each count.countername
[identifier] [integer]Counter name and the number that the counter should be increased by with each count.countername 7
[multiple identifiers]Multiple identifiers, or identifiers coupled with integers, will apply the increment to multiple counters.countername 7 counter2name 3
noneNo counter increment.
inherit
initial
unset

Example


h3 {
    counter-increment: headingnum;
}
h3::before {
    content: counter(headingnum);
}

Browser support