CSS SELECTORS ============= UNIVERSAL --------- * { color:#ff0000; } all elements BY PROPERTY ------------ h1 { color: blue; } p { font-size:80%; } all elements of that type BY CLASS -------- .animals { margin-top: 10px; } all elements of that class (class="animals") BY ID ----- #num1 { padding: 5px; } all elemnets of that id (div id="num1") DESCENDANT ---------- #main li { color:#ffc; } all list (li) elemnets within the id main .animal p { text-align:center;} all paragraphs in the animal class ul a { border: 1px black solid; } all anchors inside an unordered list ELEMENTS and CLASS ------------------ ul.speakers { text-decoration:underline; } all ul elements that are in class speakers p.animals { float:left; } all paragraphs in the animal class MULTIPLES --------- p, div, ol li { font-family:"Times New Roman", serif; } all paragraphs, divs and list elements that are in an ordered list CHILD SELECTOR -------------- li > a { } div > p { } any elemenet that is a child of another element ADJACENT SIBLINGS ----------------- h3+p { width: 85px; } any p elements that are at the same level as the h3 elements PSEUDO-CLASS ------------ a:link { color:blue; } a:visited { color: gray;} a:hover { color:red; } a:active { color:green; } applied when a condition occurs ATTRIBUTE SELECTOR ------------------ img[ alt="big pic" ] { border:0px; } code the element with the attrribute in square brackets[] with an equal sign indicating the value iof the attribute to be coded =======================================