Quick Reference
October 1, 2009, Posted by admin at 11:16 am
Here is quick reference of Style Sheet Definitions. Here some mostly used attributes are mentioned.
| Style Sheet Definitions Quick Reference |
|||
| Attribute | Description | Values | Example |
| font-size | Sets size of text. | points (pt)
inches (in) centimeters (cm) pixels (px) |
{font-size: 12pt} |
| font-family | Sets typeface. | typeface name
font family name |
{font-family: courier} |
| font-weight | Sets thickness of type. | extra-light
light demi-light medium demi-bold bold extra-bold |
{font-weight: bold} |
| font-style | Italicizes text. | normal
italic |
{font-style: italic} |
| line-height | Sets the distance between baselines. |
points (pt)
inches (in) centimeters (cm) pixels (px) percentage (%) |
{line-height: 24pt} |
| color | Sets color of text. | color-name
RGB triplet |
{color: blue} |
| text-decoration | Underlines or otherwise highlights text. |
none
underline italic line-through |
{text-decoration: underline} |
| margin-left | Sets distance from left edge of page. |
points (pt)
inches (in) centimeters (cm) pixels (px)* |
{margin-left: 1in} |
| margin-right | Sets distance from right edge of page. |
points (pt)
inches (in) centimeters (cm) pixels (px)* |
{margin-right: 1in} |
| margin-top | Sets distance from top edge of page. |
points (pt)
inches (in) centimeters (cm) pixels (px)* |
{margin-top: -20px} |
| text-align | Sets justification. | left
center right |
{text-align: right} |
| text-indent | Sets distance from left margin. | points (pt)
inches (in) centimeters (cm) pixels (px)* |
{text-indent: 0.5in} |
| background | Sets background images or colors. |
URL,
color-name RGB triplet |
{background: #33CC00} |
![]()
