The counter()
function is used to
dynamically add numbers before
various sections of a web page.
It is used in combination
with the counter-reset
and
counter-increment
properties.
Let's look at an example:
In the above example, we
are using CSS counters to
automatically number
and label the chapters.
Counters are displayed
using pseudo elements.