CSS counter() & counter-increment

I believe CSS is changing in ways you don’t expect. From the introduction of several math functions like sin(), cos(), calc(), random(), and many more, it is getting accepted as a programming language rather than a style sheet language. One of its other interesting syntax I came to understand was the counter() function and counter-increment property which basically helps you count sections or lists in your HTML and they are mostly used within pseudo-elements but can be used where the <string> value is supported in CSS.

MDN has a sweet one on the counter() function and counter-increment property, so do check them out:

10
Subscribe to my newsletter

Read articles from Sunkanmi Fafowora directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Sunkanmi Fafowora
Sunkanmi Fafowora

Lover of all things tech. I write articles on Front-end development, JavaScript, React, Python, and anything that makes my life easier. Thanks for stopping by! 😊💛