CSS1 Quick Reference

Examples

@import "http://www.w3.org/pub/WWW/def-style.css"; @import "../gray.css"; /* this is a comment */ H1 EM, P:first-letter, OL LI.special { color: yellow; background: red } #pqr321 { font-size: 8pt; font-style: normal }

Pseudo-classes

:link, :visited, :active.

Pseudo-elements

:first-line, :first-letter.

Properties

[*] = property is inherited


<repeat> = repeat | repeat-x | repeat-y | no-repeat
<scroll> = fixed | scroll
<position> = [<percentage> | <length>]{1,2} | [top | center | bottom] || [left | center | right]




Units

pt (=1/72in), in (=2.54cm), pc(=12pt), mm, cm, px, em, ex.

Colors

<color> = aqua | black | blue | fuchsia | gray | green | lime | maroon | navy | olive | purple | red | silver | teal | white | yellow | <hex-color> | <rgb-color>
<hex-color> = #RGB | #RRGGBB (where R, G, B taken from 0123456789ABCDEF)
<rgb-color> = rgb(R, G, B) | rgb(r%, g%, b%) (useful range for R, G, and B is 0-255)

URL Values

url(<URL>)