Background Attributes
background
| Values | background-color || background-image || background-repeat || background-attachment || background-position |
|---|---|
| Initial Value | refer to individual properties below |
| Inherited | no |
| Applies to | all elements |
| DOM Reference | [window.]document.getElementById("elementID").style.background |
| Specification | W3C |
background-attachment
| Values | fixed | scroll |
|---|---|
| Initial Value | scroll |
| Inherited | no |
| Applies to | all elements |
| DOM Reference | [window.]document.getElementById("elementID").style.backgroundAttachment |
| Specification | W3C |
background-color
| Values | colour | transparent |
|---|---|
| Initial Value | transparent |
| Inherited | no |
| Applies to | all elements |
| DOM Reference | [window.]document.getElementById("elementID").style.backgroundColor |
| Specification | W3C |
background-image
| Values | uri | none |
|---|---|
| Initial Value | none |
| Inherited | no |
| Applies to | all elements |
| DOM Reference | [window.]document.getElementById("elementID").style.backgroundImage |
| Specification | W3C |
background-position
| Values | [percentage | length] {1,2} | [top | center | bottom] || [left | center | right] |
|---|---|
| Initial Value | 0% 0% |
| Inherited | no |
| Applies to | block-level and replaced elements |
| DOM Reference | [window.]document.getElementById("elementID").style.backgroundPosition |
| Specification | W3C |
background-position-x,
background-postion-y
| Values | [percentage | length] | [left | center | right][percentage | length] | [ top | center | bottom] |
|---|---|
| Initial Value | 0% |
| Inherited | no |
| Applies to | block-level and replaced elements |
| DOM Reference | [window.]document.getElementById("elementID").style.backgroundPositionX[window.]document.getElementById("elementID").style.backgroundPositionY |
| Specification | Microsoft |
background-repeat
| Values | no-repeat | repeat | repeat-x | repeat-y |
|---|---|
| Initial Value | repeat |
| Inherited | no |
| Applies to | all elements |
| DOM Reference | [window.]document.getElementById("elementID").style.backgroundRepeat |
| Specification | W3C |
Font Attributes
font
| Values | font-style || font-variant || font-weight || font-size[/line-height] || (font-family | caption | icon | menu | message-box | small-caption | status-bar) |
|---|---|
| Initial Value | refer to individual properties below |
| Inherited | yes |
| Applies to | all elements |
| DOM Reference | [window.]document.getElementById("elementID").style.font |
| Specification | W3C |
font-family
| Values | [fontName [, fontName [, … ]] [, fontFamily]] | fontFamily |
|---|---|
| Initial Value | browser specific |
| Inherited | yes |
| Applies to | all elements |
| DOM Reference | [window.]document.getElementById("elementID").style.fontFamily |
| Specification | W3C |
font-size
| Values | xx-small | x-small | small | medium | large | x-large | xx-large | smaller | larger | length | percentage |
|---|---|
| Initial Value | medium or font-size of parent element |
| Inherited | yes |
| Applies to | all elements |
| DOM Reference | [window.]document.getElementById("elementID").style.fontSize |
| Specification | W3C |
font-size-adjust
| Values | z-factor | none |
|---|---|
| Initial Value | none |
| Inherited | yes |
| Applies to | all elements |
| DOM Reference | [window.]document.getElementById("elementID").style.fontSizeAdjust |
| Specification | W3C |
font-stretch
| Values | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | extra-expanded | ultra-expanded | narrower | wider | normal |
|---|---|
| Initial Value | normal |
| Inherited | yes |
| Applies to | all elements |
| DOM Reference | [window.]document.getElementById("elementID").style.fontStretch |
| Specification | W3C |
font-style
| Values | normal | italic | oblique |
|---|---|
| Initial Value | normal |
| Inherited | yes |
| Applies to | all elements |
| DOM Reference | [window.]document.getElementById("elementID").style.fontStyle |
| Specification | W3C |
font-variant
| Values | normal | small-caps |
|---|---|
| Initial Value | normal |
| Inherited | yes |
| Applies to | all elements |
| DOM Reference | [window.]document.getElementById("elementID").style.fontVariant |
| Specification | W3C |
font-weight
| Values | lighter | normal | bold | bolder | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 |
|---|---|
| Initial Value | normal |
| Inherited | yes |
| Applies to | all elements |
| DOM Reference | [window.]document.getElementById("elementID").style.fontWeight |
| Specification | W3C |
Text Attributes
color
| Values | colour |
|---|---|
| Initial Value | browser specific |
| Inherited | yes |
| Applies to | all elements |
| DOM Reference | [window.]document.getElementById("elementID").style.color |
| Specification | W3C |
direction
| Values | ltr | rtl |
|---|---|
| Initial Value | ltr |
| Inherited | yes |
| Applies to | all elements |
| DOM Reference | — |
| Specification | W3C |
letter-spacing
| Values | length | normal |
|---|---|
| Initial Value | normal |
| Inherited | yes |
| Applies to | all elements |
| DOM Reference | [window.]document.getElementById("elementID").style.letterSpacing |
| Specification | W3C |
line-height
| Values | length | percentage | number | normal |
|---|---|
| Initial Value | normal |
| Inherited | yes |
| Applies to | all elements |
| DOM Reference | [window.]document.getElementById("elementID").style.lineHeight |
| Specification | W3C |
text-align
| Values | left | center | right | justify |
|---|---|
| Initial Value | browser specific |
| Inherited | yes |
| Applies to | block-level elements |
| DOM Reference | [window.]document.getElementById("elementID").style.textAlign |
| Specification | W3C |
text-align-last
| Values | auto | left | center | right | justify |
|---|---|
| Initial Value | auto |
| Inherited | yes |
| Applies to | block-level elements |
| DOM Reference | [window.]document.getElementById("elementID").style.textAlignLast |
| Specification | Microsoft |
text-decoration
| Values | none | (underline || overline || line-through || ) |
|---|---|
| Initial Value | none |
| Inherited | no |
| Applies to | all elements |
| DOM Reference | [window.]document.getElementById("elementID").style.textDecoration |
| Specification | W3C |
text-indent
| Values | length | percentage |
|---|---|
| Initial Value | 0 |
| Inherited | yes |
| Applies to | block-level elements |
| DOM Reference | [window.]document.getElementById("elementID").style.textIndent |
| Specification | W3C |
text-overflow
| Values | clip | ellipsis |
|---|---|
| Initial Value | clip |
| Inherited | yes |
| Applies to | block-level elements |
| DOM Reference | [window.]document.getElementById("elementID").style.textOverflow |
| Specification | Microsoft |
text-shadow
| Values | [color] horizLength vertLength blurRadiusLength [, [color] horizLength vertLength blurRadiusLength [, … ]] | none |
|---|---|
| Initial Value | none |
| Inherited | no |
| Applies to | all elements |
| DOM Reference | — |
| Specification | W3C (removed as of CSS2.1) |
text-transform
| Values | uppercase | lowercase | capitalize | none |
|---|---|
| Initial Value | none |
| Inherited | yes |
| Applies to | all elements |
| DOM Reference | [window.]document.getElementById("elementID").style.textTransform |
| Specification | W3C |
vertical-align
| Values | baseline | sub | super | bottom | text-bottom | middle | top | text-top | percentage |
|---|---|
| Initial Value | baseline |
| Inherited | no |
| Applies to | inline elements |
| DOM Reference | [window.]document.getElementById("elementID").style.verticalAlign |
| Specification | W3C |
white-space
| Values | normal | nowrap | pre | pre-wrap | pre-line | inherit |
|---|---|
| Initial Value | normal |
| Inherited | yes |
| Applies to | all elements |
| DOM Reference | [window.]document.getElementById("elementID").style.whiteSpace |
| Specification | W3C |
word-spacing
| Values | length | normal |
|---|---|
| Initial Value | normal |
| Inherited | yes |
| Applies to | all elements |
| DOM Reference | [window.]document.getElementById("elementID").style.wordSpacing |
| Specification | W3C |
word-wrap
| Values | break-word | normal |
|---|---|
| Initial Value | normal |
| Inherited | yes |
| Applies to | block-level, sized inline and positioned elements |
| DOM Reference | [window.]document.getElementById("elementID").style.wordWrap |
| Specification | Microsoft |
