<!-- SophiaKnows -->

CSS 1 PROPERTIES
Rev 3: Dec 2004

This page provides a bare bones listing of the style properties included in the CSS 1.0 specification along with a summary of corresponding value options. CSS 1 properties fall into 4 broad classes: font, text, color and background, and box properties.

A brief but comprehensive listing of the properties within each group is set forth below. Note that selecting on highlighted option names enclosed in angle bracket < > will take you a listing setting forth appropriate units.

1.1 Font Properties:

font-family: <font-family> | <generic-family>;
font-style: none | italic;
font-variant: none | smallcaps;
font-weight: medium | bold;
font-size: <absolute-size> | <relative-size> | <length> | <percentage>;


1.2 Color and Background Properties:

color: <color>;
background-color: <color>;
background-image: <url>;
background-repeat: repeat | repeat n | no-repeat;
background-attachment: scroll | fixed
background-position: <percentage> | <length>


1.3 Text Properties:

word-spacing: none | <length>
letter-spacing: none | <length>
text-decoration: none | underline | overline | line-through
vertical-align: baseline | sub | super | top | text-top | middle | bottom | text-bottom | <>percentage>
text-transformation: none | capitalize | uppercase | lowercase
text-alignment: left | right | center | justify
text-indentation: <length> | <percentage>
line-height: normal | <length> | <percentage>


1.4 Box Properties:

margin-top: <length> | <percentage> | auto
margin-right: <length> | <percentage> | auto
margin-bottom: <length> | <percentage> | auto
margin-left: <length> | <percentage> | auto
margin: <length> | <percentage> | auto
padding-top: <length> | <percentage>
padding-right: <length> | <percentage>
padding-bottom: <length> | <percentage>
padding-left: <length> | <percentage>
padding: <length> | <percentage>
border-width: thin | medium | thick | <length>
border-color: <color>
border-style: none | dotted | dashed | solid | double | groove | ridge | inset | outset
border-top: <border-width> || <border-style> || <color>
border-right: <border-width> || <border-style> || <color>
border-bottom: <border-width> || <border-style> || <color>
border-left: <border-width> || <border-style> || <color>
border: <border-width> || <border-style> || <color>
width: <length> | <percentage> | auto
height: <length> | <percentage> | auto
float: none | right | left
clear: none | left | right | both

2. Property Values

2.1 generic-family

A Generic class of fonts

  • sans-serif
  • serif
  • monospace

    2.2 font-family

    A Specific font name or names:

  • Times,"Times New Roman",Georgia;
  • Verdana,Arial,sans-serif;
  • Courier,"Courier New",monospace;

    2.3 percentage

    A percentage of the parent element's controlling attribute:

  • width and height: percentage is a percentage relative to the area of parent;
  • size: percentage is a percentage relative to the base size inherited from from the parent element.

    2.4 length

    Relative Length

  • em (ems, the height of the element's font)
  • px (pixels, relative to the canvas resolution)

    Absolute Length (deprecated)

  • in (inches)
  • cm (centimeters)
  • mm (millimeters)
  • pt (points)
  • pc (picas)

    2.5 absolute-size

    xx-small | x-small | small | medium | large | x-large | xx-large

    2.6 relative-size

    larger | smaller

    2.7 color

  • By #RRGGBB: E.g. color:#336699;
  • By #RGB: E.g. color:#369;
  • By NAME: aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, and yellow.

    2.8 url

  • url(example.gif)
  • url(http://www.example.com/example.gif)
  • url( example.gif )
  • url("example.gif")
  •  

    < CODEBASE | TOP^ | MAINPAGE >

    Text & Design By Tony Pisarra
    © SophiaKnows 1998-2004