Answer the question
In order to leave comments, you need to log in
What is the difference between body table li and body > table > li?
Hello. I'm learning CSS, I have a question about the differences in how these lines work.
For example, what is the difference
body table li{
background-color: green;
}
body > table > li{
background-color: green;
}
Answer the question
In order to leave comments, you need to log in
> is a selector that will only work on nested elements in a strict order.
body > table > li will not work for example on:
body table li ul li
body table li will work on
body table li
ul li
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question