CSS element+elementSelectors
Complete CSS Selector Reference Manual
Example
Select all first <p> elements that immediately follow a <div> element:
div+p
{
background-color:yellow;
}
Try it Yourself »
Definition and Usage
element+elementThe selector is used to select the element that immediately follows the specified first element (not inside it).
Browser Support
![]()
![]()
![]()
![]()
![]()
All mainstream browsers supportelement+elementSelector.
Note: element+elementTo run in IE8, you must declare<!DOCTYPE>
Complete CSS Selector Reference Manualother extensions