CSS2 Reference

Property Values W3C Rec.
background background-color
background-image
background-repeat background-attachment background-position
CSS1
background-attachment scroll
fixed
CSS1
background-color color-rgb rgb(255, 0, 0)
color-hex #f00 or #ff0000
color-name red
transparent
CSS1
background-image url
none
CSS1
background-position top left
top center
top right
center left
center center
center right
bottom left
bottom center
bottom right

x y 130px 150px or 10% 25%
CSS1
background-repeat repeat
repeat-x
repeat-y
no-repeat
CSS1
border border-width
border-style
border-color
CSS1
border-bottom border-bottom-width border-bottom-style border-bottom-color CSS1
border-collapse collapse
separate
CSS2
border-color color-rgb rgb(255, 0, 0)
color-hex #f00 or #ff0000
color-name red
CSS1
border-left border-left-width border-left-style border-left-color
CSS1
border-right border-right-width border-right-style border-right-color CSS1
border-spacing length 10px or 2em or 30% CSS2
border-style none
hidden
dotted
dashed
solid
double
groove
ridge
inset
outset
CSS1
border-top border-top-width border-top-style border-top-color CSS1
border-top-color
border-right-color
border-bottom-color
border-left-color
border-color CSS2
border-top-style
border-right-style
border-bottom-style
border-left-style
border-style CSS2
border-top-width
border-right-width
border-bottom-width
border-left-width
border-width CSS1
border-width thin
medium
thick

length 1px or 0.2em
CSS1
caption-side top
right
bottom
left
CSS2
clear left
right
both
none
CSS1
clip shape
auto
CSS2
color color-rgb rgb(255, 0, 0)
color-hex #f00 or #ff0000
color-name red
CSS1
content string
url
counter(name)
counter(
name, list-style-type)
counters(
name, string)
counters(
name, string, list-style-type)
attr(X)
open-quote
close-quote
no-open-quote
no-close-quote
CSS2
counter-increment none
identifier number
CSS2
counter-reset none
identifier number
CSS2
cursor url
auto
crosshair
default
pointer
move
e-resize
ne-resize
nw-resize
n-resize
se-resize
sw-resize
s-resize
w-resize
text
wait
help
CSS2
direction ltr
rtl
CSS2
display none
inline
block
list-item
run-in
compact
marker
table
inline-table
table-row-group
table-header-group
table-footer-group
table-row
table-column-group
table-column
table-cell
table-caption
CSS1
empty-cells show
hide
CSS2
float left
right
none
CSS1
font font-style
font-variant
font-weight
font-size/line-height
font-family
caption
icon
menu
message-box
small-caption
status-bar
CSS1
font-family font-family, generic-family CSS1
font-size xx-small
x-small
small
medium
large
x-large
xx-large
smaller
larger

length
12pt or 16px or 1.2em or 120%
CSS1
font-size-adjust none
number 2pt or 4px or 0.2em or 20%
CSS2
font-stretch normal
wider
narrower
ultra-condensed
extra-condensed
condensed
semi-condensed
semi-expanded
expanded
extra-expanded
ultra-expanded
CSS2
font-style normal
italic
oblique
CSS1
font-variant normal
small-caps
CSS1
font-weight 100
200
300
400
or normal
500
600
700
or bold
800
900
bolder
(relative to parent)
lighter
(relative to parent)
CSS1
height auto
length 100px or 26em or 80%
CSS1
letter-spacing normal
length 10px or 2em or 30%
CSS1
line-height normal
length 2px or 1.1em or 120%
CSS1
list-style list-style-type
list-style-position
list-style-image
CSS1
list-style-image none
url
CSS1
list-style-position inside
outside
CSS1
list-style-type none
disc
circle
square
decimal
decimal-leading-zero
lower-roman
upper-roman
lower-alpha
upper-alpha
lower-greek
lower-latin
upper-latin
hebrew
armenian
georgian
cjk-ideographic
hiragana
katakana
hiragana-iroha
katakana-iroha
CSS1/2
margin margin-top margin-right margin-bottom margin-left
auto
length 10px or 2em
CSS1
margin-top
margin-right
margin-bottom
margin-left
auto
length 10px or 2em
CSS1
marker-offset auto
length 10px or 1em or 110%
CSS2
max-height none
length 100px or 26em or 80%
CSS2
max-width none
length 100px or 26em or 80%
CSS2
min-height length 100px or 26em or 80% CSS2
min-width length 100px or 26em or 80% CSS2
outline outline-width
outline-style
outline-color
CSS2
outline-width thin
medium
thick

length 4px or 0.3em
CSS2
outline-style none
dotted
dashed
solid
double
groove
ridge
inset
outset
CSS2
outline-color color-rgb rgb(255, 0, 0)
color-hex #f00 or #ff0000
color-name red
invert
CSS2
overflow visible
hidden
scroll
auto
CSS2
padding padding-top padding-right padding-bottom padding-left
auto
length 10px or 2em
CSS1
padding-top
padding-right
padding-bottom
padding-left
auto
length 10px or 2em
CSS1
position static
relative
absolute
fixed
CSS2
quotes none
string string
CSS2
table-layout auto
fixed
CSS2
text-align left
right
center
justify
CSS1
text-decoration none
underline
overline
line-through
blink
CSS1
text-indent length 10px or 2em or 30% CSS1
text-shadow none
color-rgb rgb(255, 0, 0)
color-hex #f00 or #ff0000
color-name red
length 10px or 2em
CSS3?
text-transform none
capitalize
uppercase
lowercase
CSS1
top
right
bottom
left
auto
length 10px or 2em or 30%
CSS2
unicode-bidi normal
embed
bidi-override
CSS2
vertical-align baseline
sub
super
top
text-top
middle
bottom
text-bottom

length 10px or 2em or 30%
CSS1
visibility visible
hidden
collapse
CSS2
width auto
length 100px or 26em or 80%
CSS1
white-space normal
pre
nowrap
CSS1
word-spacing normal
length 10px or 2em or 30%
CSS1
z-index auto
number
CSS2

Pseudo-classes

Pseudo-class Purpose W3C Rec.
:active activated element CSS1
:focus element has focus CSS2
:hover mouse over CSS1
:link unvisited link CSS1
:visited visited link CSS1
:first-child first child of another element CSS2
:lang language to use in specified element CSS2
:first-letter first letter of a text element CSS1
:first-line first line of a text element CSS1
:before insert content before element CSS2
:after insert content after element CSS2

Units

Unit Abbrev. Purpose
pixel px absolute
point pt absolute (font)
em em relative (font)
percent % relative
none 0 disable property