CSS Properties


How and which of these are supported by the browsers vary. It's best to test your styles sheets with different browsers. This includes the same browser on different operating systems.

Text Properties
These properties let you control basic text formatting and include the following.

Property Description
text-transform Set the case of the text.
vertical-align Aligns the element vertically to the baseline.
text-align Aligns the element horizontally to the baseline.
text-indent Sets the amount of indent for the first line of a text block.
line-height Distance between baselines of consecutive lines of text.
word-spacing Distance between words of text.
letter-spacing Distance between letters of a word.
text-decoration Underlining, overlining, strike-through, or blink of an element.

Font Properties
These properties let you control basic font characteristics and include the following.

Property Description
font-family Font family or typeface of the element.
font-style Style of type to use for the element.
font-variant Small caps style of typeface.
font-weight Boldness of the font.
font-size Size of the font.

Color and Background Properties
These properties let you control the color and background of elements and include the following.

Property Description
color Color of the element.
background-color Background color of the element.
background-image Image to use as background of the element.
background-repeat Specifies how a background image is repeated.
background-attachment Specifies if a background image can scroll.
background-position Specifies initial position of a background image.

Placement Properties
These properties let you specify where an element gets placed within its "box" and include the following.

Property Description
margin-top Top margin of an element.
margin-bottom Bottom margin of an element.
margin-left Left margin of an element.
margin-right Right margin of an element.
padding-top Padding at the top of an element.
padding-bottom Padding at the bottom of an element.
padding-left Padding at the left side of an element.
padding-right Padding at the right side of an element.
border-width Width of an elements border.
border-style Style of an elements border.
border-color Color of an elements border.
border Width, style and color of an elements border.
border-top Width, style and color of an elements top border.
border-bottom Width, style and color of an elements bottom border.
border-left Width, style and color of an elements left border.
border-right Width, style and color of an elements right border.
height Height of an element.
width Width of an element.
float How text flows around an element.
clear Prevents text from flowing around an element.

Classification Properties
These properties let you classify elements by object type and assign characteristics based on these object types and include the following.

Property Description
display How the element is displayed.
white-space How white space should be handled.
list-style-type Symbol that appears before a list item.
list-style-image Image that appears before a list item.
list-style-position How bullet and list item line up.