Sibling Combinators
Sibling combinators select elements based on their relationship to other elements at the same level.
Adjacent Sibling (+)
The + combinator selects the element immediately following another:
h2 + p selects paragraphs that come directly after an h2.
General Sibling (~)
The ~ combinator selects all following siblings:
h2 ~ p selects ALL paragraphs that follow h2 (not just adjacent).
Practical: Form Styling
Styling Lists with Siblings
Exercise: Style Adjacent Paragraph
Style the paragraph that immediately follows the heading:
Up next · Lesson 8 of 27
Attribute Selector Basics
2 min read
7 of 27 lessons done

Ask Byte about this lesson
A private chat about this lesson. Byte has read the whole lesson, answers in seconds, and shows the section each answer comes from. Ask follow-ups in any language.
Questions & Answers
Public questions about this lesson. The AI Tutor answers right away in your language, the FreeAcademy team checks answers, and every learner can read them.

