CSS Selectors

CSS Selectors

Selectors define to which elements a set of CSS rules apply.

Basic Selectors

Type selectors
This basic selector chooses all elements that matches the given name.
Syntax: eltname
Example: input will match any <input> element.
Class selectors
This basic selector chooses elements based on the value of their class attribute.