HTML Coding
Formatting Text with Style Sheets
By Laura Lemay
Last month, I discussed the various kludges that designers often use to control page layout in HTML. I also noted that HTML is in the midst of a major revolution that, when the dust clears, will allow you far greater control over the design and layout of an HTML Web page than ever before. Last month I talked about the Netscape tags <MULTICOL> and <SPACER> interim solutions that provide new HTML features, but are not major advances. The real revolution in page layout for HTML one that has been discussed for years and is finally seeing the light in Internet Explorer 3.0 is style sheets.
Style sheets allow you to add real presentation to your Web pages. If you've ever become annoyed that HTML could not perform even the most basic word-processing functions, then style sheets are for you. Ever wanted to indent a paragraph? Change its leading? Increase the amount of space between paragraphs? You can't do that in HTML without doing sneaky things with images or using tags in ways for which they were not intended. Style sheets let you do all those things without breaking your code for existing browsers.
Apart from the design advantages, style sheets also have an edge over plain HTML in terms of maintenance. Because style sheets allow you to collect presentation information at the top of a page or in a different file altogether, you can change the look and feel of a whole set of pages even a site with hundreds of thousands of pages by editing just one file.