Complete CSS selector patterns
*Select all elements
divSelect by tag name
.classNameSelect by class
#idSelect by ID
[type="text"]Select by attribute
div pAll p inside div
div > pDirect child p of div
div + pp immediately after div
div ~ pAll p after div
a:hoverWhen mouse is over element
input:focusWhen element has focus
li:nth-child(2n)Every even li
p:first-childFirst child of parent
p:not(.special)Elements not matching