Cascading Style Sheets Reference
Cascading Style Sheets Reference
http://www.w3schools.com/css/css_reference.asp
Background
Property Description Values IE F N W3C
background A shorthand property for background-color 4 1 6 1
setting all background background-image
properties in one declaration background-repeat
background-attachment
background-position
background-attachment Sets whether a background scroll 4 1 6 1
image is fixed or scrolls with fixed
the rest of the page
background-color Sets the background color of color-rgb 4 1 4 1
an element color-hex
color-name
transparent
background-image Sets an image as the url 4 1 4 1
background none
background-position Sets the starting position of a top left 4 1 6 1
background image top center
top right
center left
center center
center right
bottom left
bottom center
bottom right
x-% y-%
x-pos y-pos
background-repeat Sets if/how a background repeat 4 1 4 1
image will be repeated repeat-x
repeat-y
no-repeat
border-style Sets the style of the four borders, can have from one to four styles none 4 1 6 1
hidden
dotted
dashed
solid
double
groove
ridge
inset
outset
border-top A shorthand property for setting all of the properties for the top border-top- 4 1 6 1
border in one declaration width
border-style
border-color
border-top- Sets the color of the top border border-color 4 1 6 2
color
border-top- Sets the style of the top border border-style 4 1 6 2
style
border-top- Sets the width of the top border thin 4 1 4 1
width medium
thick
length
border- A shorthand property for setting the width of the four borders in thin 4 1 4 1
width one declaration, can have from one to four values medium
thick
length
The links in the "Property" column point to more useful information about the specific property.
W3C: The number in the "W3C" column indicates in which CSS recommendation the property is defined
(CSS1 or CSS2).
Aural style sheets use a combination of speech synthesis and sound effects to make the user listen to
information, instead of reading information.
Colors
Unit Description
color_name A color name (e.g. red)
rgb(x,x,x) An RGB value (e.g. rgb(255,0,0))
rgb(x%, x%, x%) An RGB percentage value (e.g. rgb(100%,0%,0%))
#rrggbb A HEX number (e.g. #ff0000)
This table shows the result of combining Red, Green, and Blue light sources:.
Click on a color name (or a hex value) to view the color as the background-color along with different text
colors: