kenworld
Cascading Style Sheets


Cascading Style Sheets
By: Briggs Champeon Costello and Patterson
Published: 2002
Reviewed: 8/2/2002



If you have read my earlier reviews, you know I started the year by picking up a book on HTML and XHTML thinking I would learn all about fancy text formatting for web pages. What I found was that fancy text formatting commands in HTML are deprecated (scheduled for elimination), and that one should use style sheets for such things. The authors of Cascading Style Sheets spend nearly the first third of the book pounding in the message "HTML is for structure, CSS is for presentation". But they make some good points about maintenance, applying different styles for on-line viewing verses printing, and present things in a bigger context. Namely that many applications communicate data as XML files and style sheets are equally applicable to that more general format. Plus I liked that their example of a worst-case offensive web page looked exactly like the HTML MS Word output for my resume.
Setting the font type, or any other presentation characteristic, occurs by setting a property for an object within the page. That object can be the entire body of the document, types of headers, or classes and id's declared in the document. CSS does a good job of explaining how all this works. If I was going to fault the book for anything it is the lack of a comprehensive table of CSS properties. I came away not knowing what percentage of the CSS world I had learned, and have no quick reference. I certainly have the tools to apply any new properties that I learn about, but I'd rather not miss out on anything useful. There is one downside to style sheets, but it will get better over time. A lot of older browsers have nasty bugs that mis-render pages. The book has a big chapter on workarounds but it sucked a lot of my enthusiasm for a style sheet utopia. Still I accept style sheets as the future.
Naturally I had to do something with CSS before I published this review on my web page. So I made a simple external style sheet that gives your browser some directions on how to present my information. All I had to do was make one file (kenworld.css), and add a line to each page including that file. Now if I want to change the look, I only need to edit one file.