[Contents] [Next]

XHTML and Cascading Style Sheets


One of the most important principles of Web design is creating a uniform look and feel for the entire site. To do this, you can create a standard to define how each of the HTML elements will be presented in the browser. When we created our XHTML template in Chapter 5, we defined a DTD that placed restrictions on the values of certain elements. For example, we used enumerated types to define the possible values for the font element's color and size. The problem with using DTDs to define certain elements when designing a Web site is that every developer who creates a page must know the standards and must write the appropriate values in every page.

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.

[Contents] [Next]