What Is CSS?

CSS (cascading stylesheets) is a simple mechanism for controlling the style of a Web document without compromising its structure. By separating visual design elements (fonts, colors, margins, and so on) from the structural logic of a Web page, CSS give Web designers the control they crave without sacrificing the integrity of the data - thus maintaining its usability in multiple environments. In addition, defining typographic design and page layout from within a single, distinct block of code - without having to resort to image maps, <font> tags, tables, and spacer GIFs - allows for faster downloads, streamlined site maintenance, and instantaneous global control of design attributes across multiple pages.

Table 1: Font Formatting

Name of
Property
Rule syntax Possible values
font-family <selector> {font-family:<value>;} <family-name> (specify) or serif, sans-serif, cursive, fantasy, monospace
font-style <selector> {font-style:<value>;} normal, italic, oblique
font-weight <selector> {font-weight:<value>;} normal, bold, lighter, bolder
font-size <selector> {font-size:<value>;} <absolute-size>, <relative-size>, smaller, larger
font-variant <selector> {font-variant:<value>;} normal, small-caps

Table 2: Text Formatting

Name of
Property
Rule syntax Possible values
text-decoration <selector>{text-decoration:<value>;} underline, line-through, overline, blink
text-transform <selector>{text-transform:<value>;} capitalize, uppercase, lowercase, none
text-align <selector>{text-align:<value>;} left, right, center, justify
text-indent <selector>{text-indent:<value>;} <length> (pixels), <percentage>
letter-spacing <selector>{letter-spacing:<value>;} <length> (pixels)
word-spacing <selector>{word-spacing:<value>;} <length> (pixels)
line-height <selector>{line-height:<value>;} <length> (pixels), <number of lines>

Links for more information:

Learning CSS from the W3C
Webmonkey's CSS Guide

Hosted by www.Geocities.ws

1