CSS: Selector Classification
Basic Selector
Type Selector
Match by tag name. Start with the tag name.
Universal Selector
The asterisk * that match all tag names.
Attribute Selector
match by attribute or its value.
includes:
- Class Selector
- ID Selector
Pseudo-Class Selector
Pseudo-Element Selector
Compound Selector
A combined expression with type selector, attribute selector.
Simple Selector
any that does not involve a combinator.
Complex Selector
any that uses combinator.
involving syntax of
space+>~||column combinator
Relative Selector
:has()
Nesting Selector
syntax &,
nested inside body of css block.
Selector List
,
Forgiving Selector List
:is():where()
- CSS: Selector tutorial
- CSS: type selector (tag name)
- CSS: attribute selector ([x])
- CSS: :root selector
- CSS: child selector (>)
- CSS: first child, last child, only child selectors
- CSS: pseudo-class selector (:)
- CSS: pseudo-element selector (::)
- CSS: :not negation selector
- CSS Selector: syntax shortcuts