U of S | DCS | Courses | CAI | CSS | Compatibility Principles

[Back] [Contents] [Next]


Compatibility Principles


The "trick" to making compatible web sites is to do the following:

  1. Design the site using the "font" commands as normal.
  2. Identify the different "things" your font commands are doing. For example, are you selecting a specific font to convey words your boss has said?
  3. Define stylesheet classes for all these special "things". For example, define a ".bosswords" class. Do this either at the top of the document, or preferably in an external style sheet.
  4. Attach those classes to the actual font commands. For example:
      <font color="red" class="bosswords">Bosses Words</font>
    

Old web browsers won't recognize the "class" attribute, so they will display the font colour as "red". However, newer web browsers will recognize the "class" attribute, and will display the text according to whatever is set in the "bosswords" class.

So, you could start out with just using the font command. But later, if the boss says his words should be in huge blinking text with a background image and a border on it, positioned centred in the page, you just have to define the "bosswords" class in your stylesheet. The original "font" command will be overridden with the stylesheet.


Please send comments about this course to Kevin.Lowey@Usask.CA