CSS Cheat Sheet

Display

float:
	none, left, right

clear:
	none, left, right, both

display:
	none, block, inline, list-item

white-space:
	normal, pre, nowrap

color:
background-color:
	transparent
	black, white
	red, yellow, lime, blue, aqua, fuchsia, silver
	maroon, olive, green, navy, teal, purple, gray

background-image:
	url()

background-repeat:
	repeat, no-repeat, repeat-x, repeat-y

background-attachment:
	scroll, fixed

width:
	auto, <length>, ##%

height:
	auto, <length>

Font

font-family:
	<name>  ("Times New Roman" - quote whitespace!)
	serif, sans-serif, cursive, monospace, fantasy

font-size:
	xx-small, x-small, small
	medium
	large, x-large, xx-large
	larger, smaller
	##pt, ##%

font-weight:
	normal, bold
	bolder, lighter
	100 - 900

font-style:
	normal, italic, oblique

font-variant:
	normal, small-caps

line-height:
	normal
	##pt, #.#, ##%

Text

text-decoration:
	none, underline, overline, line-through, blink

text-transform:
	none, capitalize, uppercase, lowercase

text-align:
	left, right, center, justify

text-indent:
	##em, ##%

line-height:
	normal
	#.#, ##pt, ##%

word-spacing:
	normal, <length>

letter-spacing:
	normal, <length>

vertical-align:
	baseline, sub, super, text-top, text-bottom
	top, middle, bottom
	##%

Margin/Padding

margin-left/margin-right/margin-top/margin-bottom:
margin:
	<length>, <percentage>
	auto

padding-left/padding-right/padding-top/padding-bottom:
padding:
	<length>, <percentage>

Border

border-top-width/(etc):
border-width:
	<length>

border-style:
	none, solid, double, inset, outset, groove, ridge
	dotted, dashed

border-color:
	<color>

Lists

list-style-type:
	none
	disc, circle, square
	decimal
	lower-roman, upper-roman
	lower-alpha, upper-alpha

list-style-image:
	none, url()

list-style-position:
	inside, outside

Usage

Imported CSS Style Sheet
<head>
    …
    <link rel="stylesheet" type="text/css" src="EG.css">
    …
</head>
Embedded <STYLE> Section
<style type="text/css">

A:link    { color: blue; }
A:visited { color: darkblue; }
A:active  { color: red; }

P:first-line { font-size: bigger; }
P:first-letter { font-weight: bold; }

</style>
Element's <STYLE> Tag
<div style="margin-top:12pt;">

Units

em (capital "M")
ex (lower "x")
px (pixel)
pt (points)
pc (picas)
in (inches)
mm (millimeters)
cm (centimeters)

<color>
#000000
rgb(255,255,255)
rgb(100%,50%,0%)