Search within TutorialsPark

CSS Adjacent Sibling Selector

Selects sibling Element

Definition and Notes.

1. Adjacent Sibling selector applies CSS styles to elements only if it's adjacent to the specified element.

2. To create the Selector a symbol " + " is used between the two selectors.

3. 3. Eg: h1 + p will select only the first <p> following the <h1> element, all other non-adjacent elements will not be Selected.


CSS Adjacent Sibling selector. internetexplorer safari firefox opera chrome

View in Splitscreen»


Note: Only the immediate sibling will be selected.

Related Examples.