More control with Cascading Style Sheets

Achieve greater control
over your Web document with
Cascading Style Sheets


Gary MARIANO De La Salle University

  1. Determine the thickness, style and color of
    • table borders
      <table border=1 style="border: medium solid navy;">
      
      options are thin, thick; double

    • horizontal rules
      <hr style="color: red;">
      
  2. When working with text (using <p> or <font>) you can customize
    • background color
    • text color
    • font: typeface, size, style, case, weight
    • letter-spacing, word spacing
    • indention
      <p style = "background-color: thistle;
                  color=saddlebrown;
                  font-family: verdana;                 
                  font-size: 11pt;
                  font-style: italic;
                  font-variant: small-caps;
                  font-weight: bold;
                  letter-spacing: 3;
                  line-height: 3;
                  text-align: justify;
                  text-documentation: blink; 
                  text-indent: 1em;
                  text-transform: capitalize
                  word-spacing: 2;">
      
      or
      <font style="font: 8pt/12pt verdana;>
      
      in which 8-pt Verdana type will be leaded four points.

  3. Options
    • font-family: Adobe Type, True Type, serif, sans-serif, cursive, fantasy, monospace
    • font-size: in points, or percentage of the base height
    • font-weight: lighter, normal, bold, bolder, 100, 200...900
    • letter-spacing: in points
    • line-height: 1 means single-spacing, 3 triple-spacing
      18pt is the line thickness
    • text-align: left, center, right, justify
    • text-indent: an em is the square of type
    • text-transform: capitalize, uppercase, lowercase
    • word-spacing: expressed in pts