books

Cascading Style Sheets; A Primer

ISBN: 1-55828-597-2

Authors:

  • Joseph R. Jones has worked for Internet, multimedia, and television production firms. Currently, he helps design and deploy dynamic, database-driven Web applications at Big Tent Media Labs. At Big Tent, a Bay-area interactive publishing firm, Jones uses CSS as a way to maintain consistency on a web site with dynamically changing content.
  • Paul Thurrott is the current Webmaster at Big Tent Media Labs. You can access the Big Tent web site at http://www.bigtent.com.

Publisher: MIS Press, a division of Henry Holt and Co., Inc., New York

Pages: 291

Intended Audience:

Cascading Style Sheets: A Primer was written for Web designers and web site developers. As such, the book has sections that address typography and design that developers/programmers might not already know. The primer assumes at least a rudimentary knowledge of HTML. So if you are a designer with no HTML background, you might want to learn a bit about HTML before tackling CSS web page design. Another book in the MIS Press series, HTML: A Primer, should provide good background for this text.

Summary:

Cascading Style Sheets: A Primer is designed to provide an understanding of W3C's Cascading Style Sheet (CSS) standard and how to use it. In addition, however, this text is ambitious enough to try to instill an understanding of basic design theory and typography (of which many Web designers clearly have no concept) as well as to outline good Web design principles. The book can be used as a text to provide background in both CSS and Web design. But it is also filled with tips, warnings, and shortcuts that make it a good reference for ongoing use.

Cascading Style Sheets: A Primer is divided into four distinct parts. The first part, Typography on the Web, introduces theories of information design. According to the authors, information design is much more than creating a visually pleasing, colorful, web page. Information design used the psychology of user interaction with information to outline what is, and is not, good web page design. Advanced readers look for word shapes and sentence patterns rather than collections of individual letters. Reading in all CAPS is difficult. Margins and visual boundaries on the page can help the reader organize information in an easy-to-understand way. This part of the book discusses the use of fonts, color, and text flow. Using transparent GIFs is introduced as a mechanism to create a visual layout. Tables and frames are also introduced to provide a visual layout with which the reader can interact easily. This part uses HTML markup examples to create layout design. Part I introduces the idea that even using HTML style codes, different browsers will display the page in their own way. This provides one reason why using a cascading style sheet is a good idea. The part ends with a further discussion about why using a style sheet is a good alternative to hard coding data in HTML.

Part II of the book concentrates on providing the basics of CSS. This part of the book begins with a discussion about learning to see document structure. For those who already code documents in HTML with embedded style tags and attributes, this a very important starting point. Designers often see layout but often have difficulty seeing document structure. In order to use CSS, one must intellectually separate the concepts of document structure from document style because CSS applies style to structure. The text then introduces CSS with the simplest style sheet possible:

BODY  {Color:black}

From this simple example we learn the concepts of selectors and declarations; properties and values. Simple rules of inheritance are discussed and simple cascading order is defined. Part II continues to provide a discussion of more complex selectors. Style properties are grouped into those properties affecting fonts and those affecting white space on the page. Authors often refer back to CSS' roots in desktop publishing, providing new users with a touchstone for the new media of Web design.

Part III of Cascading Style Sheets: A Primer moves on to advanced CSS design principles. Download times of identical web pages are often compared to illustrate how CSS not only provides media independence, but also how it can make web pages more efficient. Screen snaps of "good Web design" make concepts come to life. I would suggest that readers work with a browser on the Web as they read. Viewing both the web pages and the source of those pages can be quite instructive. (Even if the indicated Web page changes somewhat over time, chances are that the site still reflects the best in leading-edge design.)

Part IV of the book provides detailed case studies of some of the web pages that have been used to illustrate good design principles. Part IV also provides a "Reality Vs Theory" discussion, outlining what browser support for CSS we can find today. It also provides a strategy to convert your existing HTML-only web site into a CSS-based site. Jones and Thurrott liken this overhaul of a web site to anything from "repainting the house" to "knocking it down to bare foundation and building it again from scratch."

Finally, Cascading Style Sheets: A Primer provides a number of Appendices that I believe will prove extremely valuable to those embarking on CSS style sheet design. The appendices include a CSS/Browser compatibility chart, CSS color chart, and an HTML tag to CSS style reference chart that can help the designer make the transition to CSS.

I would highly recommend this text to anyone who wants to move from cluttered HTML tagging for style to clean structure coded HTML with CSS style codes. Not only does this text provide mechanics of CSS, but spends a great deal of time on good Web design.

One shortcoming of the book was its failure to include a discussion of Web accessibility. W3C has recently published a working draft outlining new accessibility guidelines. Using structural HTML, and coding style separately goes a long way toward making a web site accessible. For an example of how separating style from HTML coding makes a Web site more accessible, see http://www.xmlxperts.com/access.htm. A second shortcoming of this book is its failure to mention using CSS to specify style for XML. The book concentrates exclusively on linking CSS style sheets to HTML. I hope to see a discussion of CSS and XML in upcoming editions of the primer. You can find a discussion of linking CSS with XML documents by James Clark at http://www.w3.org/TR/PR-xml-stylesheet.

Return to Book Reviews
Return to Home Page
line