XHTML + style sheets = creating ‘timeless code’
Jeffrey Zeldman is an evangelist for designing with web standards and browser compatibility. He suggests that we should embrace the latest technologies to design pages that everyone can view. And he shows how it can be done. The standards in this case are methods of what he calls ‘creating timeless code’. What he means by this is using HTML, XHTML, and style sheets to create pages which can be viewed in almost all current browsers. There are two possibilities – both of which combine XHTML and style sheets.
The first is ‘transitional’ and allows light use of tables for positioning page elements. The second is ‘strict’ and requires you to use CSS for all matters of appearance. There’s a lot about browser development and why Netscape and Internet Explorer from versions 1.0 to 6.0 caused the problems for which Web standards are a solution. Then he launches into an enthusiastic account of how XML will be the technology to finally end the browser wars.
After the theory and argument, the second part of the book shows you how to work in XHTML. This will be relatively easy for anyone used to dealing with HTML. The harder part is controlling the layout and appearance of pages using style sheets.
Zeldman adopts a realistic and tolerant line, knowing that most designers will take the transitional route from HTML to XHTML. He designs a sample site using a combination of XHTML, tables, and style sheets, showing how they can be combined and yet still pass the requirements of W3C validation.
His mission all the while is to reduce the amount of code required to render a page, to eliminate ‘bloat’, and make pages available in all browsers. The secret here seems to be that pages can’t be made to look the same, but they can be made to look acceptable.
As a website designer, I would much rather have my users say my web pages ‘look funny’ rather than saying they ‘don’t work’.
He explains style sheets in a simple and clear manner, then shows them in use as he designs an attractive-looking web site one step at a time.
En passant, he reveals an amazingly clever trick for dealing with older browsers which don’t fully support style sheets. It’s to create a second, simpler set of styles, and force old browsers to use them, leaving more recent browsers to pick up the first more sophisticated set.
He also has lots of useful advice about dealing with multiple browser support, though by the time he has explained all the potential difficulties, you begin to wonder how any web page ever gets published at all.
The latter part of the book deals with accessibility issues, and he ends by showing how the interface of his personal site at zeldman.com was re-designed using style sheets. All the code and the style sheets are available as free downloads at his site.
I was surprised that there was no bibliography, and I think the publishers should have treated him to full colour reproduction. This is intermediate to advanced level guidance, but Zeldman does everything he can to make it entertaining and accessible.
© Roy Johnson 2005
Jeffrey Zeldman, Designing with Web Standards, Indianapolis:IN, New Riders, 2003, pp.435, ISBN: 0735712018
More on web design
More on digital media
More on technology