CSS Selector Reference

CSS Selectors allow us to target our HTML elements in order to style them with the CSS Properties. Selectors are patterns that target an HTML element by type, by class and id, hierarchal relationships of elements and pseudo-classes to supply us with a great deal of selection logic when styling our web documents. Each CSS level builds off of the previous level so you can apply all selectors.

CSS1 SelectorSyntax and Code Examples
type selectorX { }
group selector X, Y { }
descendant combinatorX Y { }
class selectorX.class { }
id selectorX#id { }
first-line selectorX::first-line { }
first-letter selectorX::first-letter { }
active SelctorX:active { }
hover selectorX:hover { }
link selectorX:link { }
visited selectorX:visited { }