Home  >  Help
Banner image
Help

Cascading Stylesheets (CSS)


About this tutorial:

This tutorial starts from the beginning and explains what CSS are. It then explains how to use them both though HTML code and later in the tutorial instructions for CSS use in Front Page 98 are given.  A little knowledge of HTML code would be helpful, but the section on Front Page will help out those of you who primarily use editors.  Through out the tutorial there are links to helpful pages with additional information.  There are countless pages that give information about stylesheets.  An excellent place to start to look for more info would be the W3C CSS page: http://www.w3.org/Style/CSS/   But in the meantime please continue on with the tutorial.

CSS: what exactly are they?

Cascading Stylesheets describe how documents are presented on screens, or in print.  CSS is a fairly new and simple mechanism for adding style (e.g. fonts, colors, spacing) to Web documents.  CSS is basically a template that contains a set of "rules" that tell how you want your page to look.  These rules are either referenced in a separate file or embedded direct into the HTML code.

Why are they beneficial?
The main reason CSS is beneficial is that it allows better control over the lay out of WebPages.  It allows you to add more style to the pages then you would be able to with normal html.

Stylesheets can also cut down on the amount of coding you have to do on your page.   For instance if you wanted a page where all the plain text is green, bold and font size 2, you could create a stylesheet to do this instead of having to write the font and bold tag for every instance of text.


Also stylesheets allow more ease of updating and changing of pages.  For instance say you have 5 web pages and they all reference 1 stylesheet document, and you decide you want the text to be red now instead of green.  You just go and make the change to the one CSS file and now all 5 web pages will display the red text..

In addition CSS can lead to quicker downloading pages.  First of all the as we said above there is less coding of pages.  The less code the faster the page.  Also because of CSS skillful use of colors, fonts, tables and layers often the need for large and numerous images can be reduced.

Why are the disadvantages of CSS?
The main problem with CSS is browser compatibility.  Even though CSS was introduced in 1994 it was slow to catch on at first.  Therefore most older browsers do not support CSS (IE 1&2, and Netscape 2&3). In addition since the use of CSS is still new-ish all browsers are not completely compatible.  Microsoft Internet Explorer 5.0+ can handle most CSS functions and IE 5.0 for Mac's claims to support all of CSS .   Netscape 4.0+  can use most major functions and Netscape 6 can handle just about all the CSS functions.  In general most newer browsers give support of the major CSS functions this includes Opera, Emacs, and Mozilla.

Part 2:
How to Use CSS »