CSS Combinermanual
- Vorige pagina CSS selectoren
- Volgende pagina CSS pseudoklassen
CSS Combinators
A combinator is a symbol used to explain the relationship between selectors.
The following table shows the different combinators in CSS:
Name | Symbol | Example | Example description |
---|---|---|---|
child combinator | > | div > p | Select all <p> elements that are direct children of a <div> element. |
descendant combinator | (single space) | div p | Select all <p> elements within a <div> element. |
namespace separator | | | ns | h2 | Select all <h2> elements in the namespace ns. |
adjacent sibling combinator | + | div + p | Select the first <p> element immediately following a <div> element. |
selector list | , | div, p | Selecteer alle <div> elementen en alle <p> elementen. |
Volgende broercombinator | ~ | p ~ ul | Selecteer alle <ul> elementen die voorafgaan aan <p> elementen. |
- Vorige pagina CSS selectoren
- Volgende pagina CSS pseudoklassen