Home Page
ID & Class
Elements of CSS
Sample
Bibliography
Box Model
Toby's Studio

CIPCUG SIG Notes on CSS

At the present time (Summer 2003) nearly all current browsers support CSS1 pretty much in it's entirety, however, support for CSS2 is spotty, incomplete and when implemented, buggy. For this reason, in this SIG we are only covering CSS1.

While all current browsers support CSS1, we need to be aware that Netscape 4 and Internet Explorer 4 both have trouble with some parts of CSS1. Earlier versions have no support for it. One of the advantages of CSS1 is that while the page will look nothing like how you designed it to look, all your information will be visible, all the links will work and the page will be usable even with Netscape 1 or similar. CSS1 degrades well, except for IE and Netscape 4, both of which tried to implement it but failed in some important respects. CSS1 will even display well on tiny mobile devices, can be used for the deaf who "read" it verbally and even on text-only appliances.

Deprecated: "The W3C's term for 'We aren't going to allow this sometime in the future; use it at your peril.'"

The only formatting elements I have used in the demo html code are <div>, <p>, <ul>, <li> and <strong>. W3C, the International standards committee, has encouraged html writers to use formatting elements that are also structural elements, rather than simple formatting tags that have no structural meaning. As an example, text can be bold for any number of reasons, so marking it <b> has no structural meaning. Therefore, <b> has been deprecated (the W3C's term for "We aren't going to allow this sometime in the future; use it at your peril.") in favor of <strong>. Strong is usually bold, but the use of the term also tells the code that it is meant to convey emphasis, and not as the title of a book or similar.

Start to think of html tags as a way of telling the browser what the meaning of the information is, rather than just how to format it. When full-blown CSS2 arrives, this distinction will become far more important.

Because of this, there are no <table>, <b>, <font>, <blockquote>, <center> or other non-structural elements included. Table deserves a special mention: Properly used, it is a structural element. If you are putting a spreadsheet up, the table was designed to describe it. On the Elements page, I could have used a table had I listed the elements with their corresponding definitions. Label the two columns via the <th> tags to be "Elements" and "Definition" columns and it would make structural sense. Since I only listed the elements without definitions, I stuck with a list, rather than a table. And there is a predefined definitional list which could easily use when I decide to add definitions.

Two other items to consider when composing html: (1) CSS2 is going to require that all tags be terminated. You are used to this with some tags, like <b>, but do you always add the </p> at the end of paragraphs?  Trickier is terminating elements that have no natural termination, like the image tag.  You'll now have to terminate it with a space slash inside the tag itself, like this:  <img src="my.gif"  />. Don't forget the space in front of the slash, either. It makes a difference. HTML will become far more case conscious. If you are presently in the habit of capitalizing all your html tags, start changing. They should all be lower case. When CSS2 and XML are merged into standard html, your capitalized tags will start to cause problems. I wouldn't bother to go back and redo everything now, but I would certainly get into the habit of lower-casing things as I write or edit. It'll save time later.

© 2003 by Toby Scott
Validate