You are on page 1of 3

1 | C S S A tt r i b u t e

Composite property for the background-


attachment,background-color, background-image,
background  
background-position, and background-repeat properties;
value is any of these properties' values, in any order
background-
Determines if the background image is fixed in the window or scrolls
scroll | fixed
as the document scrolls
attachment
background-
color | transparent Sets the background color of an element
color
background-
url | none Sets the background image of an element
image
percent | length | top | Sets the initial position of the element's background image, if
background-
center | bottom | specified; values normally are paired to provide x, y positions; default
position
left | right position is 0% 0%

repeat | repeat-x |
background- Determines how the background image is repeated (tiled) across an
repeat-y | no-
repeat element
repeat

Sets all four of an element's borders; value is one or more of a color, a


border  
value for border-width, and a value for border-style

Sets an element's bottom border; value is one or more of a color, a


border-bottom   value for border-bottom-width, and a value for border-
style

border- length | thin | medium |


Sets the thickness of an element's bottom border
bottom-width thick

border-
collapse | separate Sets the table border rendering algorithm
collapse
Sets the color of all four of an element's borders; default is the color of
border-color color
the element
Sets an element's left border; value is one or more of a color, a value
border-left  
for border-left-width, and a value for border-style

border-left- length | thin | medium |


Sets the thickness of an element's left border
width thick

Sets an element's right border; value is one or more of a color, a value


border-right  
for border-right-width, and a value for border-style

border-right- length | thin | medium |


Sets the thickness of an element's right border
width thick

With separate borders, sets the spacing between borders — one value
border-spacing   sets vertical and horizontal spacing; two values sets horizontal and
vertical spacing, respectively
border-style dashed | dotted | Sets the style of all four of an element's borders
double | groove |
inset | none | outset
2 | C S S A tt r i b u t e

| ridge | solid

Sets an element's top border; value is one or more of a color, a value


border-top  
for border-top-width, and a value for border-style

border-top- length | thin | medium |


Sets the thickness of an element's top border
width thick

length | thin | medium |


border-width Sets the thickness of all four of an element's borders
thick

Used with the position property to place the bottom edge of an


bottom length | percent
element
top | bottom | left |
caption-side Sets the position for a table caption
right

color color Sets the color of an element


Sets all the font attributes for an element; value is any of the values for
font   font-style, font-variant, font-weight, font-size,
line-height, and font-family, in that order

Defines the font for an element, either as a specific font or as one of


font-family List of font names the generic fonts serif, sans-serif, cursive, fantasy, and
monospace

xx-small | x-small |
small | medium |
large | x-large | xx-
font-size Defines the font size
large | larger |
smaller | length |
percent
font-size-
none | ratio Adjusts the current font's aspect ratio
adjust
wider | normal |
narrower | ultra-
condensed | extra-
condensed |
condensed | semi-
font-stretch condensed | semi- Determines the amount to stretch the current font
expanded |
expanded | extra-
expanded | ultra-
expanded

normal | italic | Defines the style of the face, either normal or some type of slanted
font-style
oblique style

font-variant normal | small-caps Defines a font to be in small caps

normal | bold | Defines the font weight — if a number is used, it must be a multiple of
font-weight bolder | lighter | 100 between 100 and 900; 400 is normal, 700 is the same as the
number keyword bold

Height length | auto Defines the height of an element


3 | C S S A tt r i b u t e

Left length | percent Used with the position property to place the left edge of an element

letter-spacing length | normal Inserts additional space between text characters

length | number | percent |


line-height normal Sets the distance between adjacent text baselines

Defines list-related styles using any of the values for list-style-


list-style  
image, list-style-position, and list-style-type

list-style- Defines an image to be used as a list item's marker, in lieu of the value
url | none
image for list-style-type

Margin length | percent | auto Defines all four of an element's margins

margin-bottom length | percent | auto Defines the bottom margin of an element; default value is 0

margin-left length | percent | auto Defines the left margin of an element; default value is 0

margin-right length | percent | auto Defines the right margin of an element; default value is 0

margin-top length | percent | auto Defines the top margin of an element; default value is 0

Quotes List of strings Sets the quote symbols used to quote text
Used with the position property to place the right edge of an
Right length | percent
element
center | justify |
text-align Sets the text alignment style for an element
left | right

blink | line-
text- through | none |
Defines any decoration for the text; values may be combined
decoration overline |
underline

Defines the indentation of the first line of text in an element; default is


text-indent length | percent 0

text-shadow See text Creates text drop shadows of varying colors and offsets
capitalize |
text-transform lowercase | none | Transforms the text in the element accordingly
uppercase

Top length | percent Used with the position property to place the top edge of an element

percent | baseline |
bottom | middle | sub
vertical-align | super | text- Sets the vertical positioning of an element
bottom | text-top |
top

Width length | percent | auto Defines the width of an element

word-spacing length | normal Inserts additional space between words

z-index number Sets the rendering layer for the current element

You might also like