the web workshop


stepsSteps to Success

  1. In Notepad, open a new file.
  2. Add the following code:
        <title>advanced styles</title>

        <link rel="stylesheet" type="text/css" href="advcss.css">


        <table border="0" cellspacing="0" cellpadding="1">
                <td>Advanced stylesheet example!</td>

        <table border="0" cellspacing="0" cellpadding="1" class="alttable">
                <td>Advanced stylesheet example!</td>



  3. Save as classes.html in the steps folder

  4. In Notepad, open a new file and copy the following style rules into it:
    body {
        font-size: 1em;
        background: #FFFFFF;
        color: #000000;
        font-family: verdana, arial, ms sans serif;

    table {
        border-right: #000000 1px solid;
        padding-right: 1px;
        border-TOP: #000000 1px solid;
        padding-left: 1px;
        margin: 0px;
        border-left: #000000 1px solid;
        color: #000000;
        border-bottom: #000000 1px solid;
        background-color: #c0c0c0;

    .alttable {
        border-right: #FF0000 2px dashed;
        border-TOP: #FF0000 2px dashed;
        padding-left: 3px; FONT-SIZE: 8pt;
        border-left: #FF0000 2px dashed;
        color: #FFFF00;
        border-bottom: #FF0000 2px dashed;
        background-color: #000000;
  5. Save as classes.css in the stepsscripts folder
  6. Preview in a browser.

advanced css

This example brings "classes" into the equation. If you create a set of rules for the <table> tag - what happens if you want to create two tables with different appearance?

The answer is to use a class. Classes are prefixed with a full period (.) and the name of the class can be whatever you decide. .alttable is the class used in the above example. When the browser reads the "class=classname" part of the table tag, it will break away from the standard table style declarations. It will jump to the .alttable rules and use those.

Classes mean that elements can be individualized, yet still use the formatting from an external css file. Thus, they are very useful and important.

This workshop is brought to you by

Please feel free to contact us with any comments and/or concerns about this workshop