What\'s the point using this syntax
div.card > div.name
What\'s the difference between this
div.card div.name
Consider the two scenarios div > span { } vs. div span { }
Here, the Take a look at two examples: Hello! This one just selects the Hello! This one selects all the span tags, even if they are nested inside other tags. (space) selects all the all the elements inside > selects all the children of
> (Greater than):
div > span {
color: #FFBA00 ;
}
Hello... (because it's immediately after the nested div tag), and World! and it won't look for the inside tag because it's not immediately after a div tag.Space
div span {
color: #0A0 ;
}