Do you have a website that contains a lot of lists or possibly your just making the one list and would like to make it as stylish as possible while still keeping scripting down to a minimum? Read ahead and you’ll learn an easy way to count elements on your page then append or prepend text to those elements allow you to give them numbers or captions easily!
First we’ll want to create your HTML list, we can use the below as a sample to get us started.
Now it’s time for the CSS part! First we’ll want to reset your counter on the page.
Then we’ll want to select where we want to start the increment of our step counter as well as append or prepend the text to add to that element. We’ll want to use the pseudo element :before or :after to our p element.