CSS Selectors are patterns that are used to find HTML elements. CSS Selectors are used to style elements on a page that match the given criteria.
Basic CSS Selectors identify elements based on their class, id, type or attributes. Advanced Selectors identify elements based on relationships between two elements or elements based on certain states.
Examples of some basic CSS Selectors are shown below.
Selects all elements
Selects all elements with class = "header"
Selects the element with id = "subheading"
Selects all <input> elements
Selects all elements with target = "_blank"