CSS | Selectors Complete Reference
CSS selectors are used to selecting the HTML elements based on their element name, id, class, attribute, and many more.
The complete reference of CSS selectors are listed below:
- CSS | [attribute*=value] Selector
- CSS | [attribute=value] Selector
- CSS | [attribute$=value] Selector
- CSS | [attribute|=value] Selector
- CSS | [attribute~=value] Selector
- CSS | [attribute^=value] Selector
- CSS | #id Selector
- CSS | * Selector
- CSS | :active Selector
- CSS | ::after Selector
- CSS | ::before Selector
- CSS | :checked Selector
- CSS | Class Selector
- CSS | :default Selector
- CSS | :disabled Selector
- CSS | element Selector
- CSS | element element Selector
- CSS | element, element Selector
- CSS | element1~element2 Selector
- CSS | :empty Selector
- CSS | :enabled Selector
- CSS | :first-child Selector
- CSS | :first-of-type Selector
- CSS | ::first-letter Selector
- CSS | ::first-line Selector
- CSS | :focus Selector
- CSS | :hover Selector
- CSS | :indeterminate Selector
- CSS | :in-range Selector
- CSS | :invalid Selector
- CSS | :lang Selector
- CSS | :last-child Selector
- CSS | :last-of-type Selector
- CSS | :link Selector
- CSS | :not Selector
- CSS | :nth-child() Selector
- CSS | :nth-last-child() Selector
- CSS | :nth-last-of-type() Selector
- CSS | :nth-of-type() Selector
- CSS | optional Selector
- CSS | :only-child Selector
- CSS | :only-of-type Selector
- CSS | :out-of-range Selector
- CSS | ::placeholder Selector
- CSS | :read-only Selector
- CSS | :read-write Selector
- CSS | :required Selector
- CSS | :root Selector
- CSS | ::selection Selector
- CSS | Syntax and Selectors
- CSS | :target Selector
- CSS | : valid Selector
- CSS | :visited Selector