Producing web pages
* HTML CSS DHTML XHTML A to Z of tags        Accessibility          Design

Why bother with style sheets?

CSS has some big advantages over standard HTML tags and their attributes. You can save an awful lot of time if you have lots of pages where you want the same look and feel.

The good things:

  • You keep the content separate from the format. Makes the page easier to read and maintain
  • You save time. I'm sure you can think of better things to do than type in <h1><font color="blue">Heading 1</font></h1> a few hundred times to make each individual <h1> appear in blue. If you use a style sheet, you just set the style for the tag to be blue instead. If you change your mind and want to make it green, just change the style. This is a big help if you have lots and lots of pages
  • Your pages look consistent. House style, visual identity and all that. You have one look across the whole site
  • You have more control over how your pages look. There are some things that you just can't do in standard HTML but with CSS you can control layout, fonts, colours, backgrounds, and other typographical effects
  • Your page is smaller because it isn't cluttered up with lots of unnecessary style statements. CSS might not cut the size of a page by huge amounts, but it is enough to make the page load quicker. Speed is important to most people

Well, there must be some drawbacks?

  • Some browsers don't support CSS at all. Although the "big two" do
  • And the rest don't support CSS properly

I still say "Use CSS". Yes, there are bugs. Yes, CSS works differently on Internet Explorer and Netscape. But, it is no worse than standard HTML and CSS does make it easier to get the page to look how you want it to.