Time for standards
March 2003
Since the WWW consortium (W3C) first launched the CSS specification in 1996, developers have been itching to stop using tables and spacer gifs to make their layouts. But the need for backwards compatibility has frustrated this desire. So in 2003, can we finally go for it?
What is a standard compliant layout?
The basis of standard compliance is the separation of content and presentation, respectively into HTML and CSS files. The content is marked up "semantically", using header, paragraph etc, rather than presentation (13pt Verdana, for example). CSS is then applied to make it all look as the designer wished.
This is how HTML was always intended to be, but before CSS only very crude layouts could be achieved. So web designers invented a whole bunch of hacks to get the presentation they wanted, at the expense of the quality of the code.
Practical advantages of CSS based layouts
The big, big winners will be disabled users: braille or voice browsers can interpret the content, semantically marked up, without having to wade through code that only serves for presentation purposes.
But that's not the only advantage. There's something for everyone in standards:
- Smaller code: Quicker to write & Easier to maintain
- Design changes to the whole site can be implemented by changing one file.
- Faster Downloads: Thanks to smaller files. Plus, on recent browsers the page will display as it downloads which is extremely useful for large pages or slow connections.
- Better support for very old browsers. They won't see the layout, but will be able to access the content. Currently, complex table based layouts break old browsers.
- Alternate stylesheets: you can have a completely different presentation
for printers or mobile devices without having to change a line of HTML.
So what's the snag?
Generation 4 browsers are the problem. They never worked properly, but their users still expect web sites to fully support them which is impossible to achieve in a standard compliant way.
Microsoft's policy of forcing upgrades at every opportunity can be irritating, but it has had the benefit of almost killing off Explorer 4. This leaves Netscape 4 as THE problem browser.
Do we still need to support Netscape 4? It does not support standards, it was launched five years ago (en eternity in Internet time) and there are now many alternatives, a part from the obvious Internet Explorer. Recent Netscapes, Operas, Mozillas and others are all free and support standards.
Netscape 4's user base
Revelate performed a log analysis of six websites representing a variety of audiences in Europe and the United States, in order to establish whether Netscape 4 still represented a large percentage of users. The analysis covered logs from December 2002 to March 2003 and gave the following results:
- 2.8% of Netscape 4 users on average
- Peak of 6.8% (German ecological site)
- Low of 0.74% (Swiss software site)
- Other sites were in the 2-3% range
A 2.8% average is small but not entirely negligible. Clearly though, the decisions have to be based on the audience of a given site. 6.8% really has to be reckoned with. 0.74% doesn't.
Our recommendations
Bearing in mind the advantages of standards based layouts, the availability of good browsers, the size of the Netscape 4 audience and the fact that it is declining (albeit slowly), we feel that moving to standards is the correct thing to do in 2003.
By hiding the full style sheet from Netscape 4 and providing it with a stripped down one, the problem can be dealt with in the following ways:
1. Ignore Netscape 4 users, letting them see the content without the layout (as with version 3 browsers).
2. Provide a basic layout, but no detailed styling.
3. Tweak the Netscape 4 style sheet so it is as good as you can. Note that it will never be perfect and de-bugging CSS for Netscape 4 is an *extremely* time consuming and frustrating process.
4. Finally, if you or your client insist on full Netscape 4 support, the only way is to stick with table based layouts.
We recommend going for option #2, or option #1 for sites with a very low Netscape 4 readership.
We also recommend the use of a message that is hidden from standards compliant browsers and informs others that the site would look sooooo much nicer with a modern web browser, but the content remains accessible to all.
Further reading
World Wide Web consortium
They write the rules.
From Web hacks to web
standards
Practical tips on how to make a CSS based layout, from an excellent resource
site.
Stuck With Old Browsers
Until 2003
In a recent update, Jakob Nielsen reaches similar conclusions. However, his
NN4 user figures are even lower (1.1% in February 2003).