Cascading Style Sheets: level 1

This page has been created to give you a quick reference to all of the CSS 1 specifications.

CSS or Cascading Style Sheets allow an author to attach or embed styles into HTML files.

Property: Value: Initial: Applies to: Inherited:
background <background-color> || <background-image> || <background-repeat> || <background-attachment> || <background-position> not defined for shorthand properties all elements no
background attachment scroll | fixed scroll all elements no
background color <color> | transparent transparent all elements no
background image <url> | none none all elements no
background position <percentage> | <length>{1,2} | top | center | bottom || left | center | right 0% 0% block-level and replaced elements no
background repeat repeat | repeat-x | repeat-y | no-repeat repeat all elements no
 
border <border-width> || <border-style> || <color> not defined for shorthand properties all elements no
border bottom <border-bottom-width> || <border-style> || <color> not defined for shorthand properties all elements no
border bottom width thin | medium | thick | <length> 'medium' all elements no
border color <color> the value of the 'color' property all elements no
border left <border-left-width> || <border-style> || <color> not defined for shorthand properties all elements no
border left width thin | medium | thick | <length> 'medium' all elements no
border right <border-right-width> || <border-style> || <color> not defined for shorthand properties all elements no
border right width thin | medium | thick | <length> 'medium' all elements no
border style none | dotted | dashed | solid | double | groove | ridge | inset | outset none all elements no
border top <border-top-width> || <border-style> || <color> not defined for shorthand properties all elements no
border top width thin | medium | thick | <length> 'medium' all elements no
border width thin | medium | thick | <length> not defined for shorthand properties all elements no
 
clear none | left | right | both none all elements no
color <color> UA specific all elements yes
display block | inline | list-item | none block all elements no
float left | right | none none all elements no
 
font <font-style> || <font-variant> || <font-weight> ? <font-size> / <line-height> ? <font-family> not defined for shorthand properties all elements yes
font family <family-name> | <generic-family>,* <family-name> | <generic-family> UA specific all elements yes
font size <absolute-size> | <relative-size> | <length> | <percentage> medium all elements yes
font style normal | italic | oblique normal all elements yes
font variant normal | small-caps normal all elements yes
font weight normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 normal all elements yes
 
height * <length> | auto auto block-level and replaced elements no
letter spacing normal | <length> normal all elements yes
line height normal | <number> | <length> | <percentage> normal all elements yes
 
list style <keyword> || <position> || <url> not defined for shorthand properties elements with 'display' value 'list-item' yes
list style image <url> | none none elements with 'display' value 'list-item' yes
list style position inside | outside outside elements with 'display' value 'list-item' yes
list style type disc | circle | square | decimal | lower-roman | upper-roman | lower-alpha | upper-alpha | none disc elements with 'display' value 'list-item' yes
 
margin <length> | <percentage> | auto not defined for shorthand properties all elements no
margin bottom <length> | <percentage> | auto 0 all elements no
margin left <length> | <percentage> | auto 0 all elements no
margin right <length> | <percentage> | auto 0 all elements no
margin top <length> | <percentage> | auto 0 all elements no
 
padding <length> | <percentage> 0 all elements no
padding bottom <length> | <percentage> 0 all elements no
padding left <length> | <percentage> 0 all elements no
padding right <length> | <percentage> 0 all elements no
padding top <length> | <percentage> 0 all elements no
 
text align left | right | center | justify UA specific block-level elements yes
text decoration none | underline || overline || line-through || blink none all elements no **
text indent <length> | <percentage> 0 block-level elements yes
text transform capitalize | uppercase | lowercase | none none all elements yes
 
vertical align baseline | sub | super | top | text-top | middle | bottom | text-bottom | <percentage> baseline inline elements no
white space normal | pre | nowrap normal block-level elements yes
width * <length> | <percentage> | auto auto block-level and replaced elements no
word spacing normal | <length> normal all elements yes