Professional Documents
Culture Documents
00
font-style normal | italic | oblique CSS Properties in Dark Red are shorthand properties and
Values in italics are place holders for an actual value (like each value must be defined. The exception is where the
font-variant normal | small-caps
1px, 1em, 1%), values in normal text are values that can property can define from one to four of the sides of a box
be used as the actual value normal | bold | bolder |
element property (Top-Right-Bottom-Left) - i.e. border-
font-weight
lighter | 100 | 200 | 300 | width
400 | 500 | 600 | 700 | 800
| 900
MEASUREMENT Grouping Multiple h1, h2, h3 { font-family: Verdana; } E[foo] an E element with a "foo" attribute
elements of
% percentage different E[foo="bar"] an E element whose "foo" attribute value is exactly
types equal to "bar"
cm centimeter
Class Multiple .sampleclass { text-decoration: E[foo~="bar"] an E element whose "foo" attribute value is a list of
elements of underline; } space-separated values, one of which is exactly
em 1em = current font size of current different equal to "bar"
element types when
you don’t E an E element whose "hreflang" attribute has a
ex 1ex = ~1/2 current size of current want to affect [hreflang|="en"] hyphen-separated list of values beginning (from the
element all instances left) with "en"
of that type
inch E:first-child an E element, first child of its parent
in Id A single #sampleid { text-decoration:
element type underline; }
millimeter E:link an E element being the source anchor of a hyperlink
mm when you
E:visited of which the target is not yet visited (:link) or
don’t want to
already visited (:visited)
pc pica (= 12 points) affect all
instances of
E:active an E element during certain user actions
that type
pt point (= 1/72 inch) E:hover
E:focus
Descendant An element #gallery h1 { text-decoration:
px pixel that is below underline; }
E:lang(fr) an element of type E in language "fr" (the
(in the
document language specifies how language is
COLORS document
determined)
tree) another
Red, blue, green, dark green element—no
Color name matter how
E::first-line the first formatted line of an E element
many levels
rgb(x,y,z) Red = rgb(255,0,0) below E::first-letter the first formatted letter of an E element
rgb(x%,y%,z%) Red = rgb(100%,0,0) Child An element #title > p { font-weight: bold; } E::before generated content before an E element
that is
Red = #ff0000 (or shorthand = directly below
#rrggbb (in the
E::after generated content after an E element
#f00)
document
tree) another E.warning an E element whose class is "warning" (the
element document language specifies how class is
determined).
Sibling All elements h1 + p { font-style: italic; }
of a type that E#myid an E element with ID equal to "myid".
share the
same parent EF an F element descendant of an E element