How can i do the equivalent of start at for an ordered list using css | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How can i do the equivalent of start at for an ordered list using css

I want to be able to make an ordered list of class special-list start at 5. While i know i can do so using html <ol start=5> I want to know if I can do so using only css. Something like <ol class="special-list"> And in head or another css file .special-list { start:5 } Or same other term as start is not recognized in css

21st Jul 2019, 7:14 PM
Hothouseinwar Polik
Hothouseinwar Polik - avatar
1 Answer
+ 2
ol.special-list { list-style: none; counter-increment: start 4; margin-left: -16px; } ol.special-list > li:before { content: counter(start, number) ". "; counter-increment: start; } https://code.sololearn.com/WbQ71P4F9E09/?ref=app
21st Jul 2019, 8:04 PM
dozule
dozule - avatar