Sjoerd Visscher's weblog

My ideas about new web technology that can change the future of the world wide web.

Last Update

10/25/2002; 8:15:45 PM

Weblog Search

Don't like the look of this site?

XML coffee mug
Click to see the XML version of this web page.

Updated with

Click here to visit the Radio UserLand website.

Wednesday, February 13, 2002

Before more people get confused, let me say a few things. 1. Using tables doesn't mean your page can't validate. 2. Validating your HTML is important. 3. Validating your HTML isn't complicated or a lot of work. For Radio Userland this means: 1. The built-in macros should produce valid HTML. 2. The default theme should validate. Now check out this page. There are no big problems there. A good start would be to change radio.images.imageRef so that it produces alt="" when the alt parameter is empty. But actually providing alt texts will make some blind users and images.google.com happy.

Now, how does this compare to my comments yesterday. Valid HTML does not mean you're using the HTML in a valid way. Why? Each HTML tag has some kind of meaning. When you use a <blockquote> tag, it means you're quoting a block of text from someone else. But tables don't actually mean very much. To 'blockquote' the HTML spec:

The HTML table model allows authors to arrange data -- text, preformatted text, images, links, forms, form fields, other tables, etc. -- into rows and columns of cells.

However, the HTML specs warns you:

Tables should not be used purely as a means to layout document content as this may present problems when rendering to non-visual media. Additionally, when used with graphics, these tables may force users to scroll horizontally to view a table designed on a system with a larger display. To minimize these problems, authors should use style sheets to control layout rather than tables.

So, can you use tables or not? It depends. I don't think it's wrong to use a table to put a sidebar next to the body. Certainly as long as it is complicated to do with CSS. But if you wrap each post inside a table, together with a number of spacer images, you should look at CSS. The good news is: in the first case tables are the easiest way to it, and in the second case CSS is the easiest solution. So you not only have nice HTML, but you have it faster.

Maybe a nice rule of thumb is to think about what would happen if a voice-browser would read your page. A table-based site layout would then sound like this: "w3future.com. Below that on the left 'a sidebar' and on the right 'the body'." etc. This gives a clear translation of you site, and helps the person that hears your page to have some feel of the structure of your site. But using tables to layout a post wouldn't sound as nice: "'A spacer image' next to 'the title'. Below that 'a spacer image' next to 'the text of this post' next to 'a spacer image'." You just want to hear: "'the title'. 'the text of this post'".