Cascading style sheets (CSS) enable you to apply a uniform look to all the documents belonging to a Web site. Now we'll look at CSS documents briefly and then see how they can be applied to XHTML documents.
CSS documents allow you to define a style for any HTML element. Thus, you can define the style for an h1 element to be red with a font size of 6. This style can then be applied to every h1 element on your Web site. CSS documents allow you to create a uniform style throughout your Web documents without having to enter specific information for each h1 element in each page. If you need to change the style for an h1 element, you need to change it only in the CSS document. If you need to override the style defined in the CSS document for one or more of your h1 elements in a specific page, you can do this, too.
One major problem with using CSS documents is that they are not supported in every browser. Microsoft Internet Explorer 5 supports nearly all the features of CSS documents, and Internet Explorer 4 also supports most of the CSS features. Netscape has released version 6 that supports CSS level 1 and the DOM. If there are problems with the final release of Netscape 6, it is likely that you will find information on these problems on these Web sites:
If you were to create an XHTML document, you could use CSS documents to define the presentation of the XHTML information. While CSS documents can work for XHTML, they will not work for XML documents that do not contain presentation information. For XML documents without presentation information, you must use XSL.updated