The counter-increment
property
is used to specify the increment
value. The default increment is 1.
In the above code snippet, we are
incrementing the counter by multiples of 2.
Let's look at an example:
In the example above, the counter-increment
property
is used in the h2::before
pseudo-element.
It increments the value of the chapter-counter
counter by 2 for each <h2>
element.
This means that the counter will be incremented by 2
each time it encounters an <h2>
element.