Skip to main content

Command Palette

Search for a command to run...

CSS counter() & counter-increment

Published
•1 min read•View as Markdown
CSS counter() & counter-increment
S

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! 😊💛

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:

More from this blog

S

Sunkanmi's Blog

49 posts

Lover of all things tech. 👨🏾‍💻

I write articles on JavaScript, React, Front-end development, Python, and anything that makes my life easier. 💛

Thank you for stopping by!