You are on page 1of 3

Quick Reference Guide to CSS

Selector { property: value; }

Property Value Options


Background:
Background-color: 17 legal CSS colors (see below)
Background-image: url(filename.jpg);
Background-repeat: Repeat, no-repeat, repeat-x, repeat-y
Background-position: top, bottom left, right, center; length values;or
percentage values
Background-attachment: scroll, fixed
Width: %, px, em
Margin: Any/all keywords below
Margin-left: Auto, length (px, cm, in) , percentage
Margin-right Auto, length (px, cm, in) , percentage
Margin-top Auto, length (px, cm, in) , percentage
Margin-bottom Auto, length (px, cm, in) , percentage
Padding:
Padding-right: px, em
Padding-left: px, em
Padding-top: px, em
Padding-bottom: px, em
Border: Any/all keywords below
Border-width: Thin, thick, medium
Border-color: [Color, hexadecimal, or RBG value]
Border-style: None, solid, double, dotted, dashed, groove,
ridge, inset, outset
Border-right, border-left, border-top, Any/all above
border-bottom[-width, -color, -style]
Float: Left, right
Clear: Left, right, both

Text Properties
Color: Colors, hexadecimal, RGB values
Letter-spacing: px, ems
Word-spacing: px, ems
Text-align: Center, justify, left, right
Font Any/all keywords below
Font-family: Font names, serif, sans-serif, cursive,
monospace
Font-size: Percentage, ems, small, medium, large,
larger, smaller, xx-small, x-small, xx-large, x-
large
Font-style: Normal, italic
Font-weight: Normal, bold
Text-transform: capitalize. uppercase, lowercase, none
Cascading Style Sheets (CSS): Pixel-Level Control with HTML Ease Summer 2008 - This material has been created by Lisa Bartle for 1
the Infopeople Project [infopeople.org], supported by the U.S. Institute of Museum and Library Services under the provisions of the Library
Services and Technology Act, administered in California by the State Librarian. Any use of this material should credit the author and
funding source.
Quick Reference Guide to CSS

Cascading Style Sheets (CSS): Pixel-Level Control with HTML Ease Summer 2008 - This material has been created by Lisa Bartle for 2
the Infopeople Project [infopeople.org], supported by the U.S. Institute of Museum and Library Services under the provisions of the Library
Services and Technology Act, administered in California by the State Librarian. Any use of this material should credit the author and
funding source.
Quick Reference Guide to CSS

Text-decoration None, underline, overline, line-through

Links A:link, A:hover, A:active, A:visited


are selectors
Color: Colors, hexadecimal, RGB values
Background: Colors, hexadecimal, RGB values
Font-weight: Bold

Colors (17 Standard CSS) Aqua, black, blue, fuchsia, gray, green, lime,
maroon, navy, olive, orange, purple, red,
silver, teal, white, yellow

Background-position

Cascading Style Sheets (CSS): Pixel-Level Control with HTML Ease Summer 2008 - This material has been created by Lisa Bartle for 3
the Infopeople Project [infopeople.org], supported by the U.S. Institute of Museum and Library Services under the provisions of the Library
Services and Technology Act, administered in California by the State Librarian. Any use of this material should credit the author and
funding source.