| Property | Description | Values |
|---|---|---|
| font |
A shorthand property for setting all of the properties for a font in one declaration | font-style font-variant font-weight font-size/line-height font-family caption icon menu message-box small-caption status-bar |
| font-family |
A prioritized list of font family names and/or generic family names for an element | family-name generic-family |
| font-size |
Sets the size of a font | xx-small x-small small medium large x-large xx-large smaller larger length % |
| line-height | Sets the distance between lines | normal number length % |
| font-size-adjust | Specifies an aspect value for an element that will preserve the x-height of the first-choice font | none number |
| font-stretch | Condenses or expands the current font-family | normal wider narrower ultra-condensed extra-condensed condensed semi-condensed semi-expanded expanded extra-expanded ultra-expanded |
| font-style |
Sets the style of the font | normal italic oblique |
| font-variant |
Displays text in a small-caps font or a normal font | normal small-caps |
| font-weight |
Sets the weight of a font | normal bold bolder lighter 100 200 300 400 500 600 700 800 900 |
| Property | Description | Possible Values |
|---|---|---|
| color | Sets the color of a text | color |
| direction | Sets the text direction | ltr rtl |
| letter-spacing | Increase or decrease the space between characters | normal length |
| text-align | Aligns the text in an element | left right center justify |
| text-decoration | Adds decoration to text | none underline overline line-through blink |
| text-indent | Indents the first line of text in an element | length % |
| text-shadow | none color length |
|
| text-transform | Controls the letters in an element | none capitalize uppercase lowercase |
| unicode-bidi | normal embed bidi-override |
|
| white-space | Sets how white space inside an element is handled | normal pre nowrap |
| word-spacing | Increase or decrease the space between words | normal length |
| Property | Description | Values |
|---|---|---|
| list-style | A shorthand property for setting all of the properties for a list in one declaration | list-style-type list-style-position list-style-image |
| list-style-image | Sets an image as the list-item marker | none url |
| list-style-position | Sets where the list-item marker is placed in the list | inside outside |
| list-style-type | Sets the type of the list-item marker | none disc circle square decimal decimal-leading-zero lower-roman upper-roman lower-alpha upper-alpha lower-greek lower-latin upper-latin hebrew armenian georgian cjk-ideographic hiragana katakana hiragana-iroha katakana-iroha |
| marker-offset | auto length |
| Property | Description | Values |
|---|---|---|
| margin | A shorthand property for setting the margin properties in one declaration | margin-top margin-right margin-bottom margin-left |
| Sets the bottom margin of an element | auto length % |
|
| Sets the left margin of an element | auto length % |
|
| Sets the right margin of an element | auto length % |
|
| margin-top | Sets the top margin of an element | auto length % |
| Property | Description | Values |
|---|---|---|
| padding | A shorthand property for setting all of the padding properties in one declaration | padding-top padding-right padding-bottom padding-left |
| Sets the bottom padding of an element | length % |
|
| Sets the left padding of an element | length % |
|
| Sets the right padding of an element | length % |
|
| padding-top | Sets the top padding of an element | length % |
| Pseudo-classes | Purpose |
|---|---|
| active | Adds special style to a selected link |
| hover | Adds special style to a link when you mouse over it |
| link | Adds special style to an unvisited link |
| visited | Adds special style to a visited link |
| Unit | Description |
|---|---|
| % | a percentage of something |
| in | inch |
| cm | centimeter |
| mm | millimeter |
| em | one em is equal to the font size of the current element |
| ex | one ex is the x-height of a font, the x-height is usually about half the font-size |
| pt | point (1 pt is the same as 1/72 inch) |
| pc | pica (1 pc is the same as 12 points) |
| px | pixels (a dot on the computer screen) |
| Unit | Description |
|---|---|
| color_name | A color name (red) |
| rgb(x,x,x) | A rgb value (rgb(255,0,0)) |
| rgb(y%, y%, y%) | A rgb percentage value (rgb(100%,0%,0%)) |
| #rrggbb | A hex number (#ff0000). |