Problem with Using ">" in CSS

You’re not selecting unique children but direct children.

Take this HTML as an example:

<div>
    <span>
        <span></span>
   </span>
</div>

The selector div span would target both spans in the above example.

The selector div > span would target only the outer span.

2 Likes