A CSS selector is the part of a CSS rule that describes what elements in a document the rule will match.
CSS pseudo-classes enable selecting elements based on information that lies outside of the document tree.