Combinators
A selector can contain more than one simple selector. Between the simple selectors, we must include a combinator—something that explains the relationship between the selectors. There are three different combinators in CSS2, and one extra in CSS3; when we use them, they change the nature of the selector to reflect one of the following types:
In this Section
- Descendant Selector
matches an element that’s a descendant of a specified element - Child Selector
selects an element that’s the immediate child of a specified element - Adjacent Sibling Selector
selects an element that’s an adjacent sibling to a specified element - General Sibling Selector
selects an element that’s a sibling to a specific element
User-contributed notes
Add a note
To post a note on this topic, please log in with your SitePoint username and password. If you don't have an account yet, you can create a new account for free.