CSS element+element (Adjacent Sibling Selector) Selector

❮ Previous Selectors Next ❯

Example

div + p {
  background: red;
}

Meaning

The element+element selects adjacent siblings.

The above example selector matches all p elements that appear immediately after div elements.

Version: CSS2




Standard Syntax

element + element {
  css declarations;
}



Browser Support

The numbers in the table specify the first browser version that fully supports the property.




Status







❮ Previous Selectors Next ❯