Underlined items means it stands for something else. i.e. length=number.
W3Schools CSS Reference
| Class | Type | Attributes | Examples |
| font | -family | family-name | generic-family-name | Times | serif, Courier | monospace, sans-serif | Helvetica |
| font | -style | normal | italic | oblique | |
| font | -variant | normal | small-caps | |
| font | -weight | normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900 | |
| font | -size | absolute-size|relative-size|length|percent | Absolute=xx-small,x-small,small, medium, large,x-large,xx-large. relative=smaller,larger |
| font | font-family [font-style font-variant font-weight font-size line-height] | ||
| color | color | ||
| ----- | |||
| background | -color | color | transparent | |
| background | -image | URL | none | |
| background | -attachment | scroll | fixed | |
| background | -position | percent | length | [[left| center|right] [top|center| bottom]] | |
| ----- | |||
| text | word-spacing | length | normal | |
| text | word-wrap | normal | break-word | break-word allows long words to be broken. |
| text | letter-spacing | length | normal | |
| text | -decoration | Set color, style, line, and shadow in one call | |
| text | -decoration-color | color | |
| text | -decoration-style | solid(default)|double|dotted|dashed|wavy | determines the way the line (if any) is displayed. |
| text | -decoration-line | none(default)|underline|overline| line-through | determines where a line (if any) is displayed. |
| text | -decoration-shadow | ||
| text | vertical-align | percent | baseline | sub | super | top | text-top | middle | bottom | text-bottom | |
| text | -transform | capitalize | uppercase | lowercase | none(default) | convert all text in a block |
| text | -align | left | right | center | justify | |
| text | -indent | length | percent | Used on the first line in a <P> |
| text | line-height | normal | length | percent | number | |
| text | tab-size | number | number of spaces to substitute for a tab |
| text | -justify | auto|inter-word|distribute|none|trim | determines how to justify if text-align is set to justify. |
| ----- | |||
| box | margin-top | auto | length | percent | |
| box | margin-right | auto | length | percent | |
| box | margin-bottom | auto | length | percent | |
| box | margin-left | auto | length | percent | |
| box | margin | magin-top margin-right margin-bottom margin-left | |
| box | padding-top | length | percent | |
| box | padding-right | length | percent | |
| box | padding-bottom | length | percent | |
| box | padding-left | length | percent | |
| box | padding | padding-top padding-right padding-bottom padding-left | |
| box | border-top-width | length | thin | medium | thick | |
| box | border-right-width | length | thin | medium | thick | |
| box | border-bottom-width | length | thin | medium | thick | |
| box | border-left-width | length | thin | medium | thick | |
| box | border-width | border-top-width border-right-width border-bottom-width border-left-width | specify each width using one call |
| box | border-color | color | |
| box | border-style | none|dotted|dashed|solid|double|groove|ridge|inset|outset | |
| box | border-top | border-top-width border-style border-color | add width, color, and style attributes to border-top |
| box | border-right | border-right-width border-style border-color | add width, color, and style attributes to border-right |
| box | border-bottom | border-bottom-width border-style border-color | add width, color, and style attributes to border-bottom |
| box | border-left | border-left-width border-style border-color | add width, color, and style attributes to border-left |
| box | border | border-width border-style border-color | all borders at once with the same values |
| box | width | auto | length | percent | |
| box | height | auto | length | percent | |
| box | float | left | right | none | |
| box | clear | none | left | right | both | |
| box | visibility | hidden | visible | collapse | collapse=hidden for most items |
| box | vertical-align | top|text-top|middle|bottom|text-bottom|sub|super | |
| box | max-height | none(default)|length|percent | length=100px or 75% |
| box | max-width | none(default)|length|percent | length=100px or 75% |
| box | min-height | none(default)|length|percent | length=100px or 75% |
| box | min-width | none(default)|length|percent | length=100px or 75% |
| ----- | |||
| class | display | block | inline | list-item | none | |
| class | white-space | normal | pre | nowrap | |
| class | list-style-type | disc|circle|square|decimal|lower-roman|upper-roman|lower-alpha| upper-alpha|none | |
| class | list-style-image | URL | none | |
| class | list-style-position | inside | outside | |
| class | list-style | list-style-type list-style-image list-style-position | |
| ----- | |||
| table | border-spacing | length | |
| table | empty-cells | show(default)|hide | |
| table | table-layout | auto(default)|fixed | |
| table | caption-side | top(default)|bottom | |
| table | border-collapse | separate(default)|collapse | |
| ----- | |||
| list | -style | set all list styles in one call | |
| list | counter-increment | complicated. Uses counter-reset to allow subsections. | |
| list | counter-reset | Uses counter-increment to allow subsections. | |
| list | -style-image | none(default)|URL | |
| list | -style-position | inside|outside(default) | determines where the marker will be placed. |
| list | -style-type | none(default)|disc|circle|decimal|square|many more | see the w3schools site for the full list |
| ----- | |||
| ui | resize | none(default)|both|vertical|horizontal | determines if an element can be resized by the user. |
| ui | cursor | many | sets the cursor shape. |
Usage
| In Stylesheet | In Document |
| #menu {float: left; width: 10em; } | <DIV id="menu"> |
| p {text-indent: 2em; } | <P> |
| td.r {text-align: right; } | <TD class="r" |
| <P STYLE="font-size: 18pt"></P> |
Use <LINK REF="stylesheet" TYPE="text/css"
HREF="file.css"> to link the external stylesheet to the document.
Use <STYLE TYPE="text/css"> P {text-indent: 3em;} </STYLE> to
create stylesheet codes in the HEAD section.