What is the difference between using the >
selector and not using it? , since I see the same result.
ul > li {
color: red;
}
ol li {
color: blue;
}
<ul>
<li>Hola</li>
</ul>
<ol>
<li>Chau!</li>
</ol>
What is the difference between using the >
selector and not using it? , since I see the same result.
ul > li {
color: red;
}
ol li {
color: blue;
}
<ul>
<li>Hola</li>
</ul>
<ol>
<li>Chau!</li>
</ol>
Assigns style to each li where the parent element is ul
ul > li {
color: red;
}
ol li {
color: blue;
}
<ul>
<span><li>Chau!</li></span>
</ul>
<ol>
<span><li>Chau!</li></span>
</ol>