Place an XHTML tag onto a CSS page and add a declaration.
h2 {color:#000000; font-size:15px}
Place multiple XHTML tags onto a CSS page and then provide a declaration of styling. They must be separated by a comma.
h1, h2, h3 {color:#ffffff}
Target a tag very specifically by placing selectors together as the appear in their hierarchy.
ul li a {text-decoration:none}
Target the very next tag only if it is a child of the first.
h1>em {font-size:20px}
Classes are used to style tags and they will be used more than once in the document.
.hereisaclass {font-family:Verdana}
Id's are used when it is only necessary to style one item and it will not be used again.
#hereisanid {background-color:#000000}
These are used when it is desired for everything to be styled or just a selection of a tag and grandchild also.
* {color:#cccccc}
When two tags share a parent and they are immediately adjacent to each other, the targeted will be effected (the selector preceded by a + and it is a sibling to.
h1 + p {font-size{20px}
With these you can target the attributes of similar elements as long as there is some differences i.e. alts, titles etc.
img[title=“style this image”] {border:0px}
These classes can be used on any element, and are commonly used on a tags. They commonly used to style the color of a hyperlink when static, after being visited, when being hovered upon and when being clicked.
p:hover {color:#ffffff}
When using these, if a class is added and the certain Pseudo-class condition occurs within the markup, then the styling will take place.
p:first-child {color:red}
By using these, special markups that are not actually in code will be added i.e. :first-letter, :first-line, :before and :after.
p:first-letter {color:red}