This page lists all style properties included in the CSS 1.0 specification.
Selecting on the property names in the leftmost column will load a brief description, example and list of widely supported child attributes and accepted values for each of the listed properties
Font Properties:
Font Properties set the basic attributes (font, size etc.) of displayed text, and include some -- but not all -- elements common to the inline font tag
Font Family | font-family: <font-family> | <generic-family>; |
Font Style | font-style: none | italic; |
Font Variant | font-variant: none | smallcaps; |
Font Weight | font-weight: medium | bold; |
Font Size | font-size: <em> | <pixels> | <point> | <size>; |
Color and Background Properties:
Color Properties set the color of foreground elements (typically text) displayed in the page.
Background Properties set the color, background image and/or behaviors of background elements (body, table, etc.) displayed in the page.
Color | color: <color>; |
Background Color | background-color: <color>; |
Background Image | background-image: <url>; |
Background Repeat | background-repeat: repeat | repeat n | no-repeat; |
Background Attachment | background-attachment: scroll | fixed |
Background Position | background-position: <percentage> | <length> |
Text Properties: Text Properties determine the layout (spacing, alignment, etc.) of text elements diplayed in the page.
Word Spacing | word-spacing: none | <absolute length> |
Letter Spacing | letter-spacing: none | <length> |
Text Decoration | text-decoration: none | underline | overline | line-through |
Vertical Alignment | vertical-align: baseline | sub | super | top | text-top | middle | bottom | text-bottom | <percentage> |
Text Transformation | text-transformation: none | capitalize | uppercase | lowercase |
Text Alignment | text-alignment: left | right | center | justify |
Text Indentation | text-indentation: <length> | <percentage> |
Line Height | line-height: normal | <number> | <length> | <percentage> |
Box Properties: Box Properties determine the layout (height, width, spacing, etc.) of structural elements (pargraphs, tables, spans, etc.) displayed in the page.
Top Margin | top-margin: <length> | <percentage> | auto |
Right Margin | right-margin: <length> | <percentage> | auto |
Bottom Margin | bottom-margin: <length> | <percentage> | auto |
Left Margin | left-margin: <length> | <percentage> | auto |
Margin | margin: <length> | <percentage> | auto |
Top Padding | top-padding: <length> | <percentage> |
Right Padding | right-padding: <length> | <percentage> |
Bottom Padding | bottom-padding: <length> | <percentage> |
Left Padding | left-padding: <length> | <percentage> |
Padding | padding: <length> | <percentage> |
Top Border Width | top-border-width: <length> | <percentage> |
Right Border Width | right-border-width: thin | medium | thick | <length> |
Bottom Border Width | bottom-border-width: thin | medium | thick | <length> |
Left Border Width | left border width: thin | medium | thick | <length> |
Border Width | border-width: thin | medium | thick | <length> |
Border Color | border-color: <color> |
Border Style | border-style: none | dotted | dashed | solid | double | groove | ridge | inset | outset |
Top Border | top-border: <border-top-width> || <border-style> || <color> |
Right Border | right-border: <border-top-width> || <border-style> || <color> |
Bottom Border | bottom-border: <border-top-width> || <border-style> || <color> |
Left Border | left-border: <border-top-width> || <border-style> || <color> |
Border | border: <border-top-width> || <border-style> || <color> |
Width | width: <length> | <percentage> | auto |
Height | height: <length> | <percentage> | auto |
Float | float: none | right | left |
Clear | clear: none | left | right | both |