Selector | Description | Type | CSS Version |
---|---|---|---|
* | any element | Universal selector | CSS2 |
e | an element of type e | Type selector | CSS1 |
e f | an f element descendant of an e element | Descendant combinator | CSS1 |
e > f | an f element child of an e element | Child combinator | CSS2 |
e + f | an f element immediately preceded by an e element | Adjacent sibling combinator | CSS2 |
e ~ f | an f element preceded by an e element | General sibling combinator | CSS3 |
A code example from Stylin’ with CSS, Third Edition by Charles Wyke-Smith. Visit stylinwithcss.com for more CSS information and updates.