If you've ever created a web site, you've most likely used an assortment of <font> and other tags to control how your pages look. This ties the presentation of your site with its content, making it hard to modify your site's design. Suppose you later decide you want to change the color scheme or fonts used in your site - you'll have to edit every page in order to do this.
Style sheets provide a solution to this problem. Instead of defining the site's design in each and every page, you can use a style sheet to control the overall layout of your site. Then if you want to change how your site looks, you simply modify the style sheet.
For an nice example of this, visit the TopStyle home page at
http://www.bradsoft.com/topstyle/.
At the top of each page you'll see a small
image. If you click this image, the site will switch to a different style sheet.
This example - while simple - should give you a good idea of the flexibility provided by style sheets.
Please note that only a very basic overview of style sheets is provided here - several important topics, such as positioning, are not mentioned. For a more thorough overview of style sheets, we strongly recommend picking up a copy of Cascading Style Sheets: Designing for the Web, which was written by two of the architects of CSS. You may also find it helpful to browse our list of external CSS resources for more information.
Next » |