What does the ">" symbol mean in css?
There is no valid <
character in CSS. If you use it, you will invalidate your css.
However, you can use a >
- child selector .
In CSS4, an object selector will appear. At the moment, it is marked with $
.
So
$#parent a:hover{ /* styles */ }
therefore, these rules will not apply to a in hoverstate, but it is parent with parent
-ID. CSS4 specification
Perhaps you are thinking of a selector >
(great than a character).
This selector is known as the selector of child combinators.
This means that it will select only the direct children of the parent. For instance:
ul > li
So, for example, if you want to put a nested unordered list as such:
<ul> <li></li> <li> <ul> </ul> </li> </ul>
You would need to style it as such:
ul > li > ul
But this is only when using >
, a selector of child combinators.