in ,

Getting Started with CSS Counters

As web developers, proper representation of information is an important feature. One way to properly display information is by denoting hierarchy, answering the question of “what comes first?”.

One sure way to denote hierarchy is by numbering objects. Apart from the ordered list, there is no other element that allows us to increment order in CSS. If we wanted to display numbers like we have above, we had to do some preprocessing. Keeping track of the index, making sure to auto-increment it etc. Something like this.

Thankfully, with CSS we can keep track of things like this without breaking a sweat, using CSS counters.

View Tutorial

Written by Fribly Editorial

Fribly is a digital magazine where we will share useful and awesome stuff for your inspiration and benefit.
We will hope to bring you daily resources and inspiration from all around the web. You just sit back and enjoy, and we will do all the search work for you. We will strive to find the best and most useful stuff out there.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

GIPHY App Key not set. Please check settings

Fun Hex Navigation

Humblle Rought Free Font