CSS related again: What's up with "ol ol ol li"? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

CSS related again: What's up with "ol ol ol li"?

In browsing around the web looking for different ways to build/begin a Style Sheet, I found some that, in declaring all the properties/elements/values and such, it had first ol li {... (lots of stuff)}, then ol ol li {...} and finally ol ol ol li {...}! I'm wondering does it mean 1st occurring then 2nd then 3rd and, in ol ol ol li for example (being 3rd of...something) {apply following attributes} the 3rd such OCCURRING ol? Or is it just for a triple NESTED ol? Please help me understand. Thanks in advance!

26th Sep 2017, 2:55 AM
Michael
Michael - avatar
1 Answer
+ 6
Yes you're right the "ol ol ol li" indicate a nested hierarchy CSS selector which select the <li> inside the <ol> of <ol> of <ol>. Yup you get the idea. Here's a demo for better understanding:- https://code.sololearn.com/Wc1VFu5ceIO4/?ref=app
26th Sep 2017, 4:39 AM
Zephyr Koo
Zephyr Koo - avatar