The counter()
CSS function returns a string representing the current value of the named counter, if there is one. It is generally used in the content
property of pseudo-elements, but can theoretically be used anywhere a <string>
value is supported.
/* Simple usage */ counter(countername); /* changing the counter display */ counter(countername, upper-roman)
A counter has no visible effect by itself. The counter()
function (and counters()
function) is what makes it useful by returning developer defined strings (or images).