CSS Selector Level 2 » Child combination

This child combination selector will match child elements which are direct children of the first selector.

# Syntax

E > F {
    /* declarations */

# Example

div > span {
    color: red;

The first inner <span> inside the <div> will be red because its a direct child, the inner inner <span> will not be matched.

Try example in CodePen

# Browser support

Platform Chrome Firefox Safari Edge Internet Explorer Opera
Desktop Yes (1.0) Yes (1.0) Yes (1.3) Yes (12.0) Yes (7.0) Yes (9.2)

Please wait a moment, the comments start loading now...
explorermozillachromesafariopera info external