Adjacent sibling combinator
noun
say it: “uh-JAY-sunt SIB-ling KOM-bih-nay-ter” /əˈdʒeɪsənt ˈsɪblɪŋ ˈkɒmbɪneɪtər/
The + sign between two selectors, read "next sibling", that matches the one element that comes right after another with the same parent.
What is the adjacent sibling combinator?
The adjacent sibling combinator + picks an element that comes straight after another, with the same parent.
h2 + p { font-size: 1.2em; } /* the first paragraph right after a heading */
In a sentence
- “Writing h2 + p with the adjacent sibling combinator made only the first paragraph after each heading larger.”
Level: Novice · More CSS terms at this level
Updated