0
What do the > mean in CSS, i didnt see in the tutorial, but see it in some code.
3 Answers
+ 2
In CSS the '>' symbol is used to indicate direct inclusion. For instance, the '.a > p' selector will only select 'p' tags whose first parent is of class 'a'.
0
div > a This means the 'a' is the immediate child descendant of 'div' on a first level. Or to say it in another way. The 'a' tag is a direct child of 'div'.
However, if the 'a' tag is inside a 'p' tag which is also inside the 'div' tag, the selector will not work because the 'a' tag becomes a grand child of div and a also is a direct child of 'p'. This will become p > a
0
Thanks!