Coding with Style
By Michael Floyd
When former columnist Laura Lemay reported on Cascading Style Sheets (CSS) earlier this year (see "HTML Coding," Web Techniques, January 1997), the topic seemed to go virtually unnoticed. This, despite the fact that the World Wide Web Consortium (W3C) was about to release the first "official" CSS standard and that Microsoft had already added support for style sheets in Internet Explorer 3.0.
In fact, CSS have been a part of the World Wide Web plan since its beginning. An Internet Request for Comments went out in mid-1993, and by 1994 -- when the Web hit big -- Tim Berners-Lee was working on a rudimentary implementation. But because style sheets were unavailable to early HTML authors, browser companies introduced proprietary extensions, tag abuse became prevalent, and kludges began to appear.
One kludge used GIF images to (among other things) create richer text for graphics like logos. To add other special effects to text, HTML authors began to take advantage of a little-used feature in CompuServe's GIF89a specification that allowed multiple images to be stored in a single file. A sense of motion could be created by displaying these images in sequence. When the Netscape browser began to support GIF animation, it became a de facto standard over night.
Another kludge used tables to control page layout. Microsoft's Webzine Slate was one of the first to use tables to create nice-looking margins, which have since become a handy place to add advertising (using that other kludge, GIF images) and provide navigation without resorting to frames -- the ultimate kludge that as of yet has no fix.<>