June 2025
Beginner
817 pages
31h 30m
English
A combinator is a character between two selectors that concatenates these selectors. Here, the first selector represents the condition, while the second selector forms the target to be selected if the condition is true. In CSS, you have four such combinators, which in turn you can concatenate with other combinators.
|
Combinator |
Name |
Meaning |
|---|---|---|
|
E F |
Descendant selector (descendant combinator) |
F gets selected if it’s a descendant of an E element. |
|
E > F |
Child selector (child combinator) |
F gets selected only if it’s a direct descendant of an E element. |
|
E + F |
Adjacent sibling selector (adjacent sibling combinator) |
F gets selected only if it occurs directly after E (in the ... |
Read now
Unlock full access