this question has probably asked and answered a million times but I just want to know the difference of using .div1 > .div1-1
compare to .div1 .div1-1
.
I know that ">" is child selector so .div1 (parent) > .div1-1 (child)
.
<div class="div1">
<div class="div1-1">Test</div>
</div>
.div1 > .div1-1{ color:red;}
Which approach is the best practice to use?