You are on page 1of 4

Font | Color & Background | Text | Box | Classification | Positioning (CSS2)

font-family [[<family-name> | <generic-family>],]* all elements yes n/a


[<family-name> | <generic-family>]

default: UA-specific
font-style normal | italic | oblique all elements yes n/a

font-variant normal | small-caps all elements yes n/a

font-weight normal | bold | bolder | lighter | 100 | all elements yes n/a
200 | 300 | 400 | 500 | 600 | 700 | 800
| 900

font-size <absolute-size> | <relative-size> | all elements yes relative to parent


<length> | <percentage> element's font size

default: medium
font [<font-style> || <font-variant> || <font- all elements yes allowed on <font-size>
(shorthand property) weight>]? <font-size> [/<line- and <line-height>
height>]? <font-family>

default: not defined

color <color> all elements yes n/a

default: UA-specific
background-color transparent | <color> all elements no n/a

background-image none | <url> all elements no n/a

background-repeat repeat | repeat-x | repeat-y | no- all elements no n/a


repeat

background- scroll | fixed all elements no n/a


attachment

background-position [<percentage> | <length>]{1,2} | [top | block-level and no refer to the size of the
center | bottom] || [left | center | right] replaced elements element itself

default: 0% 0%
background <background-color> || <background- all elements no allowed on
(shorthand property) image> || <background-repeat> || <background-
<background-attachment> || position>
<background-position>

default: not defined

word-spacing normal | <length> all elements yes n/a

letter-spacing normal | <length> all elements yes n/a

text-decoration none | [underline || overline || line- all elements no n/a


through || blink]

default: none
vertical-align baseline | sub | super | top | text-top | inline elements no refer to the 'line-height'
middle | bottom | text-bottom | of the element itself
<percentage>

text-transform none | capitalize | uppercase | all elements yes n/a


lowercase

text-align left | right | center | justify block-level elements yes n/a

default: UA-specific
text-indent <length> | <percentage> block-level elements yes refer to parent
element's width

default: 0
line-height normal | <number> | <length> | all elements yes relative to the font size
<percentage> of the element itself

margin-top <length> | <percentage> | auto all elements no refer to parent


element's width

default: 0
margin-right <length> | <percentage> | auto all elements no refer to parent
element's width

default: 0
margin-bottom <length> | <percentage> | auto all elements no refer to parent
element's width

default: 0
margin-left <length> | <percentage> | auto all elements no refer to parent
element's width

default: 0
margin [<length> | <percentage> | auto]{1,4} all elements no refer to parent
(shorthand property) element's width

default: not defined


padding-top <length> | <percentage> all elements no refer to parent
element's width

default: 0
padding-right <length> | <percentage> all elements no refer to parent
element's width

default: 0
padding-bottom <length> | <percentage> all elements no refer to parent
element's width

default: 0
padding-left <length> | <percentage> all elements no refer to parent
element's width

default: 0
padding [<length> | <percentage>]{1,4} all elements no refer to parent
element's width

default: 0
border-top-width medium | thin | thick | <length> all elements no n/a
border-right-width medium | thin | thick | <length> all elements no n/a

border-bottom-width medium | thin | thick | <length> all elements no n/a

border-left-width medium | thin | thick | <length> all elements no n/a

border-width [thin | medium | thick | <length>]{1,4} all elements no n/a


(shorthand property)

default: not defined


border-color <color>{1,4} all elements no n/a

default: the value of the


'color' property
border-style none | dotted | dashed | solid | double all elements no n/a
| groove | ridge | inset | outset

border-top <border-top-width> || <border-style> || all elements no n/a


(shorthand property) <color>

default: not defined


border-right <border-right-width> || <border-style> all elements no n/a
(shorthand property) || <color>

default: not defined


border-bottom <border-bottom-width> || <border- all elements no n/a
(shorthand property) style> || <color>

default: not defined


border-left <border-left-width> || <border-style> || all elements no n/a
(shorthand property) <color>

default: not defined


border <border-width> || <border-style> || all elements no n/a
(shorthand property) <color>

default: not defined


width auto | <length> | <percentage> block-level and no refer to parent
replaced elements element's width

height auto | <length> block-level and no n/a


replaced elements

float none | left | right all elements no n/a

clear none | left | right | both all elements no n/a

display block | inline | list-item | none all elements no n/a

white-space normal | pre | nowrap block-level elements yes n/a

list-style-type disc | circle | square | decimal | lower- elements with 'display' yes n/a
roman | upper-roman | lower-alpha | value 'list-item'
upper-alpha | none

list-style-image none | <url> elements with 'display' yes n/a


value 'list-item'

list-style-position outside | inside elements with 'display' yes n/a


value 'list-item'

list-style <keyword> || <position> || <url> elements with 'display' yes n/a


(shorthand property) value 'list-item'
default: not defined

position static | absolute | relative all elements no n/a

left auto | <length> | <percentage> elements with the no refer to parent


'position' property of element's width and
type 'absolute' or height. If parent's
'relative' height is set to 'auto',
percentage is
undefined.

top auto | <length> | <percentage> elements with the no refer to parent


'position' property of element's width and
type 'absolute' or height. If parent's
'relative' height is set to 'auto',
percentage is
undefined.

z-index auto | <integer> positional elements no n/a

width auto | <length> | <percentage> block-level and no refer to parent


replaced elements, element's width and
elements with height. If parent's
'position' property height is 'auto',
value of 'absolute' percentage of height
is undefined

height auto | <length> | <percentage> block-level and no refer to parent


replaced elements, element's width and
elements with height. If parent's
'position' property height is 'auto',
value of 'absolute' percentage of height
is undefined

clip auto | <shape> elements with the no n/a


'position' property of
type 'absolute'

overflow visible | hidden | scroll | auto elements with the no n/a


'position' property of
type 'absolute'

visibility inherit | visible | hidden all elements if value is 'inherit' n/a

You might also like