Cascading Style Sheets: Separating Content from Presentation

Authors: Owen Briggs, Steven Champeon, Eric Costello, and Matt Patterson

Review by Iris Yoffa
Journal of the Tucson Computer Society
Tucson, Arizona

If you are looking for a thorough understanding of CSS, the background, the concepts, the issues and the implementation, this is the book for you. A deep learning experience is contained in 399 pages of mainly text, lots of code examples and the occasional relevant screen shot. The assumption is that you, the reader, knows at least basic HTML and are interested in doing some 'hand coding'. The examples use XHTML (Extensible Hypertext Markup Language). Don't let that worry you, they use pretty much the same tags and the authors point out the syntax differences, where XHTML has improved upon it's predecessor, HTML. This book is about 'best practices' in the creation and implementation of Cascading Style Sheets. The four authors and six contributors are all actively involved in web development and the web community.

We begin with a brief overview of the evolution of the web and the associated technologies. A lengthy discussion follows on the distinctions between structure, semantics and presentation beginning with:

"Structure refers to how the various parts of the document are put together, and semantics refers to what meaning they convey. Presentation refers to the way that those parts are manipulated, delivered, and displayed to the user."

For example, the <H1> </H1> tag is intended to indicate a first heading in a document. This would be the structure and semantics of the tag. Your browser contains a style sheet of default display properties such as font face, color and size. By using CSS you may redefine the tag attributes in terms of the content you are displaying. The authors emphasize the need to analyze the information you intend to display and create style properties to reflect the content.

The chapter on fundamental concepts explains block and inline elements, how styles can be applied through the principles of inheritance and cascade, and how the box model is used to define areas of a document in order to apply formatting through styles. Next we get to rules, the statements that define the styling properties to be applied to the page elements. And finally, the different ways you can attach style rules to your HTML/XHTML documents.

The chapter on typography, 'the design of text', covers everything from typeface terminology, to font-family concepts, as well as an abundance of typeface and white space properties. The discussion on sizing and positioning the text elements on the page for effective presentation was very useful. The next chapter is an intensive on Boxes, Boxes, Boxes. Using boxes, a division of your page for controlling your layout, is the current standard in web development. Tables should only be used for presenting tabular data. The code examples in this section are easy to follow and could be readily adapted to an existing project. Applying styles to the table elements has not been forgotten. The explanation of the properties and attributes available when working with tables and cells is clearly explained and diagrammed.

The browser issues get their own special chapter. While the CSS standards are quite clear and published on the web for public access, the browser designers did not always write their code to adhere to them. Notably, you never know how the various versions of Netscape Navigator 4 will display a styled page. Even current browsers can present you with surprises. This chapter makes the web designer aware of the big challenges to be aware of and stresses the need to test, test, test, and offers some trouble-shooting tips.

The last 100 pages of the book give you a chance to try out your new skills on a variety of design projects offered by six contributors. The titles and designers are as follows: Weblog: Dave Shea, Research Institute Site: John Simons, Buffalo Philharmonic Orchestra Site: Michael Switzer, Photo Gallery: Dan Rubin, Image Viewer: Michael Pick, and Real Estate Portal: Cornelia Lange.

In Summary:
I really gained a tremendous amount of information about using CSS for web site design from reading this book. I retain knowledge when I have a deep understanding of the mechanism behind a new concept and the authors did a great job of thoroughly explaining the how's, why's, and where's of applying styles effectively, as well as the drawbacks of the browser challenges. If you have an interest in learning about the fundamentals of style sheet creation as well as the principles of effective presentation and design for the web, you should pick up a copy of Cascading Style Sheets: Separating Content from Presentation.

Where to get it:
Cascading Style Sheets:
Separating Content from Presentation
Authors: Owen Briggs, Steven Champeon, Eric Costello, and Matt Patterson
ISBN: 1-59059-231-X
friends of ED
An Apress imprint
2560 Ninth Street, Suite 219
Berkeley, CA 94710
$39.99 USA