css   intro |  html |  css |  design |  scripting |  dhtml |  server 

Intro
Definitions
Text Attributes
Length Units

CSS Text Attributes and Values

font-family
Can be one or more font family names separated by spaces. If the font family name is more than one word, enclose it in quotation marks. When using multiple font families, list them in order of preference. The ability to render a particular font will depend on the fonts installed on the end user's system. Possible font-families include Helvetica, sans-serif, serif, Times, etc.

font-size
Can be set using xx-small, x-small, small, medium, large, x-large, xx-large or you can set a length.

font-style
Possible values are normal, italic, oblique. IE 4 treats italic and oblique as the same, and Navigator 4 doesn't recognize oblique.

font-weight
Weight (or boldness) of font. Possible values are: bold, bolder, lighter, normal, 100, 200, 300, 400, 500, 600, 700, 800, 900.

letter-spacing
Spacing between characters. Set with length.

line-height
Spacing between lines. Can be set with a length value or number (number of lines, i.e. 1.5 or 2).

margin-left, margin-right, margin-top, margin-bottom
Set margins with a length value. Example: margin-left: 20px.

text-align
Can align text with: left, center, right, justify. (Note: Browser support for justify can be spotty).

text-decoration
Possible values are: blink, line-through, overline, underline.

text-indent
Sets the indent for the first line of a paragraph or block of text. Value can be length or percentage of outermost element.

word-spacing
Spacing between words. Set with length.



Next Page: CSS Length Units
Previous Page: Writing CSS Definitions
 
hardCoder.com © 1999-2011. all rights reserved. // site created and maintained by kathy ahn