| UNIVERSAL SELECTOR | The CSS universal selector (*) matches elements of any type. When utilising @namespace, universal selectors can be namespaced. |
{} |
|---|
| ID SELECTOR | The CSS ID selector matches an element based on the value of the element’s id attribute. This is what you'd use to refer to that one-of-a-kind element with an id. |
id {} |
|---|
| CLASS SELECTOR | The CSS class selector matches elements based on the contents of their class. |
.class {} |
|---|
| TYPE SELECTOR | It selects all elements of the given type within a document. In other words, the type selector in CSS matches components based on their node names. |
h1, h2 ,h3 {} |
|---|
| ADJACENT SIBLING SELECTOR | The adjacent sibling combinator (+) separates two selectors. It comes right after the first element, and they're both children of the same parent. |
h1 + p {} |
|---|
| CHILD SELECTOR | The child combinator (>) is placed between two CSS selectors. |
ul > li {} |
|---|
| GENERAL SIBLING SELECTOR | Select all elements that follow the first element such that both are children of the same parent. |
h1 ~ p {} |
|---|
| DESCENDANT SELECTOR | Any selector with white space between two selectors without a combinator. |
p a {} |
|---|