Quick Reference to CSS1
Definitions
Block-level elements an element which has a line break before and after (e.g.
<H1>, <P>) Replaced element An element which is replaced by content
pointed to from the element. E.g., <IMG>.
Properties
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
"*".
font-family
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>
<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>
Percentage values: allowed on <font-size> and <line-height>
color
<color>
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>|
top | center | bottom | left | center | right
background
<background-color> | <background-image>
| <background-repeat> | <background-attachment> | <background-position>
Percentage values: allowed on <background-position>
word-spacing
normal | <length>
letter-spacing
normal | <length>
text-decoration
none | underline | overline
| line-through | blink
vertical-align
baseline | sub | super
| top | text-top | middle | bottom | text-bottom | <percentage>
text-transform
capitalize | uppercase | lowercase | none
text-align
left | right | center | justify
text-indent
<length> | <percentage>
line-height
normal | <number> | <length>
| <percentage>
margin-top
<length> | <percentage> |
auto
margin-right
<length> | <percentage> |
auto
margin-bottom
<length> | <percentage> |
auto
margin-left
<length> | <percentage> |
auto
margin
<length> | <percentage> |
auto
padding-top
<length> | <percentage>
padding-right
<length> | <percentage>
padding-bottom
<length> | <percentage>
padding-left
<length> | <percentage>
padding
<length> | <percentage>
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>
border-color
<color>
border-style
none | dotted | dashed
| solid | double | groove | ridge | inset | outset
border-top
<border-top-width> | <border-style>
| <color>
border-right
<border-right-width> | <border-style>
| <color>
border-bottom
<border-bottom-width> | <border-style>
| <color>
border-left
<border-left-width> | <border-style>
| <color>
border
<border-width> | <border-style>
| <color>
width
<length> | <percentage> |
auto
height
<length> | auto
float
left | right | none
clear
none | left | right |
both
display
block | inline | list-item | none
white-space
normal | pre | nowrap
list-style-type
disc | circle | square | decimal
| lower-roman | upper-roman | lower-alpha | upper-alpha | none
list-style-image
<url> | none
list-style-position
inside | outside
list-style
<list-style-type> | <list-style-position>
| <url>
<length> [+|-]?<number><unit> <number>
<digit>+[.<digit>*]? <unit> <absolute-unit>
| <relative-unit> <absolute-unit> mm | cm | in |
pt | pc <relative-unit> em | ex | px
<percentage> <number>%
<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(<text>)
This version is based on: http://www.w3.org/TR/REC-CSS1
Latest version: http://www.w3.org/TR/WD-css1.html
Author: Sharon Scollard