CSS I Glossary:
In each definition:
- the default value is shown in bold, or given separately
- values apply to all elements unless otherwise stated
- properties are inherited unless the property name is marked with a star "*".
Properties:
Font Properties
font-family
[[<family-name> | <generic-family>],]* [<family-name> | <generic-family>]
Initial: UA specific
- <generic-family>
-
serif | sans-serif | cursive | fantasy | monospace
font-style
normal | italic | oblique
font-variant
normal | small-caps
font-weight
normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900
font-size
<absolute-size> | <relative-size> | <length> | <percentage>
Initial: medium
Percentage values: relative to parent element's font size
- <absolute-size>
-
xx-small | x-small | small | medium | large | x-large | xx-large
- <relative-size>
-
larger | smaller
font
[ <font-style> || <font-variant> || <font-weight> ]? <font-size> [ / <line-height> ]? <font-family>
Initial: not defined for shorthand properties
Percentage values: allowed on <font-size> and <line-height>
Color and Background Properties
color
<color>
Initial: UA specific
background-color*
<color> | transparent
background-image*
<url> | none
background-repeat*
repeat | repeat-x | repeat-y | no-repeat
background-attachment*
scroll | fixed
background-position*
[<percentage> | <length>]{1,2} | [top | center | bottom] || [left | center | right]
Applies to: block-level and replaced elements
Initial: 0% 0%
Percentage values: refer to the size of the element itself
background*
<background-color> || <background-image> || <background-repeat> || <background-attachment> || <background-position>
Initial: not defined for shorthand properties
Percentage values: allowed on <background-position>
Text Properties
word-spacing
normal | <length>
letter-spacing
normal | <length>
text-decoration*
none | [ underline || overline || line-through || blink ]
Inherited: no, but see clarification below
vertical-align*
baseline | sub | super | top | text-top | middle | bottom | text-bottom | <percentage>
Applies to: inline elements
Percentage values: refer to the 'line-height' of the element itself
text-transform
capitalize | uppercase | lowercase | none
text-align
left | right | center | justify
Applies to: block-level elements
Initial: UA specific
text-indent
<length> | <percentage>
Applies to: block-level elements
Initial: 0
Percentage values: refer to parent element's width
line-height
normal | <number> | <length> | <percentage>
Percentage values: relative to the font size of the element itself
Box Properties
margin-top*
<length> | <percentage> | auto
Initial: 0
Percentage values: refer to parent element's width
margin-right*
<length> | <percentage> | auto
Initial: 0
Percentage values: refer to parent element's width
margin-bottom*
<length> | <percentage> | auto
Initial: 0
Percentage values: refer to parent element's width
margin-left*
<length> | <percentage> | auto
Initial: 0
Percentage values: refer to parent element's width
margin*
[ <length> | <percentage> | auto ]{1,4}
Initial: not defined for shorthand properties
Percentage values: refer to parent element's width
padding-top*
<length> | <percentage>
Initial: 0
Percentage values: refer to parent element's width
padding-right*
<length> | <percentage>
Initial: 0
Percentage values: refer to parent element's width
padding-bottom*
<length> | <percentage>
Initial: 0
Percentage values: refer to parent element's width
padding-left*
<length> | <percentage>
Initial: 0
Percentage values: refer to parent element's width
padding*
[ <length> | <percentage> ]{1,4}
Initial: 0
Percentage values: refer to parent element's width
border-top-width*
thin | medium | thick | <length>
border-right-width*
thin | medium | thick | <length>
border-bottom-width*
thin | medium | thick | <length>
border-left-width*
thin | medium | thick | <length>
border-width*
[thin | medium | thick | <length>]{1,4}
Initial: not defined for shorthand properties
border-color*
<color>{1,4}
Initial: the value of the 'color' property
border-style*
none | dotted | dashed | solid | double | groove | ridge | inset | outset
border-top*
<border-top-width> || <border-style> || <color>
Initial: not defined for shorthand properties
border-right*
<border-right-width> || <border-style> || <color>
Initial: not defined for shorthand properties
border-bottom*
<border-bottom-width> || <border-style> || <color>
Initial: not defined for shorthand properties
border-left*
<border-left-width> || <border-style> || <color>
Initial: not defined for shorthand properties
border*
<border-width> || <border-style> || <color>
Initial: not defined for shorthand properties
width*
<length> | <percentage> | auto
Applies to: block-level and replaced elements
Percentage values: refer to parent element's width
height*
<length> | auto
Applies to: block-level and replaced elements
float*
left | right | none
clear*
none | left | right | both
Classification Properties
display*
block | inline | list-item | none
white-space
normal | pre | nowrap
Applies to: block-level elements
list-style-type
disc | circle | square | decimal | lower-roman | upper-roman | lower-alpha | upper-alpha | none
Applies to: elements with 'display' value 'list-item'
list-style-image
<url> | none
Applies to: elements with 'display' value 'list-item'
list-style-position
inside | outside
Applies to: elements with 'display' value 'list-item'
list-style
<list-style-type> || <list-style-position> || <url>
Applies to: elements with 'display' value 'list-item'
Initial: not defined for shorthand properties
Length units
<length> [+|-]?<number><unit>
<number> <digit>+[.<digit>*]?
<unit> <absolute-unit> | <relative-unit>
<absolute-unit> mm | cm | in | pt | pc
<relative-unit> em | ex | px
Percentage Units
<percentage> <number>%
6.3 Color units
<color> <color-name> | <rgb>
<color-name>
aqua | black | blue | fuchsia | gray | green | lime | maroon | navy |
olive | purple | red | silver | teal | white | yellow
<rgb> #<hex><hex><hex> |
#<hex><hex><hex><hex><hex><hex> |
rgb(<number>, <number>, <number>) |
rgb(<percentage> <percentage>, <percentage>)
URL
<url>
url(<text>)