The descendant combination selector selects every element with the type of e.g. F
which has as parent an element with the element type of E
.
# Syntax
Copy
E F {
/* declarations */
}
# Example
Copy
div span {
background-color: green;
color: white;
}
This example will add a green background-color
with a white color
to every <span>
which has a <div>
as parent.
# Browser support
Platform
Chrome
Firefox
Safari
Edge
Internet Explorer
Opera
Desktop
Yes (1.0)
Yes (1.0)
Yes (1.0)
Yes (12.0)
Yes (3.0)
Yes (2.0)
Mobile
Yes (1.0)
Yes (1.0)
Yes (1.0)
Yes (12.0)
Yes (3.0)
Yes (2.0)
Please wait a moment, the comments start loading now...