CSS element>elementSelectors
Complete CSS Selector Reference Manual
Example
Select all <p> elements whose parent is a <div> element:
div>p
{
background-color:yellow;
}
{
background-color:yellow;
}
Try it Yourself »
Definition and Usage
element>elementSelectors are used to select specific parent elements.
Note:An element that is not selected cannot directly specify a child element of its parent.
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support it.element>elementSelector.
Note:element>elementWhen running in IE8, must declare.<!DOCTYPE>
Complete CSS Selector Reference Manualother extensions