views:

93

answers:

4

Forgetting about things that pertain exclusively to the developer like code maintainability and religion wars about semantics and what-not, my question is: what real world problems does using tables present to the user? Are there device that cannot understand a tabled layout properly? Does it decrease the page's relevance on search engines?

Of course I'm talking about a reasonable layout where tables are only used for things that in pure CSS/divs require hacks (and for tabular data obviously) -- not things like a hundred nested tables maybe even used instead of ul/li.

+1  A: 

Tables are such old technology that they are reliably rendered on every device and in every program I know.

I am not encouraging the use of tables for layout unless really, really necessary (which it is in a few cases), but I do not believe a well done layout using tables for some aspects does automatically affect rendering negatively. Feel free to prove me wrong, though.

There may be problems for text to speech programs when a table is used instead of the semantically correct element, e.g. in ordered/unordered lists. But I believe that any text to speech or other accessibility software has provisions for this, otherwise it would not be usable on today's Internet.

There may also be cases in which a browser that needs to intelligently resize a web page (e.g. a mobile browser) has more trouble with tables than with other layout elements. But that depends very much on the individual layout and situation.

Pekka
re re-sizing: this could be a virtue or an annoyance. One advantage of using a table layout is that your content blocks will NOT wrap on page resizing. You may want, or not want, this.
Richard
@Richard: but that's also behavior you can control via CSS and it's much more flexible to do so.
Paul
+2  A: 

User agents (aka browsers) for the visually-impaired may use spoken descriptions of a webpage.

When the layout is done by table, the description of the page contents becomes a description of the table, which is unlikely to help understanding.

pavium
Do those device describe the structure or the contents of the page? Because with divs there is basically no structure (that's kind of the point with divs) and as for content isn't a `title` attribute in a `<td>` descriptive enough of its contents?
kemp
I think the text to speech would describe the contents of a table in terms of its rows and columns, which I believe would be a confusing extra level of detail for a visually impaired user. A sighted user wouldn't be aware of the underlying table.
pavium
the html -> plain text features of most parsers I've seen appear to render non-nested table content pretty well. With multi-nested tables will get confusing, but the OP is talking about simple tables.
Richard
A: 

Here's a nice presentation that sums up the problems with tables pretty well: http://www.hotdesign.com/seybold/06problems.html

Tatu Ulmanen
The only interesting point in that page is #5, but it's just a statement with no details. #2 is questionable, but I guess it's an actual issue, however small.
kemp
A: 

The main end-user argument I have about it is future-proofing, and page size (which relates to load time, which relates to user experience). If you are designing a page semantically, and using the minimal markup approach, then page sizes w/o table-based layout are almost always smaller than pages that use a table-based layout.

That's more bits on the wire on every request for that page, which (as stated) means longer load times, etc. min-html + external CSS sheet, however, works out to markedly faster load times for most production sites (see Yahoo's YSLOW guidance) due to the fact that there's usually a one to many relationship between CSS sheets and pages, which means that you are taking advantage of browser's caching capabilities (and potentially other intermediate devices caching as well).

The future-proofing comment is related to design changes. It's much easier to effect wholesale visual layout redesign from CSS with a min-markup page than it is to do so in most common table-based designs. See csszengarden.com for examples.

Obviously, YMMV in both cases. If you're really making the minimal use of tables (e.g. one table on a page, one row in that table, three TDs in that row, one for each column), then you probably don't have to worry about those things. That said, ime, it's better to learn the CSS techniques, or pay someone who knows them. Designs quickly become more complex than you think they will up front many times, and using tables as a quick fix soon becomes a slippery slope. Again, all said IME; YMMV.

Paul
As I said I'm not considering a clean, well written div-based layout vs a messed up pile of nested tables. If you make the minimal use of tables, just for what divs are not good at (i.e. grids), then will a few bytes really make a difference?
kemp
@kemp. As I said, the bytes are only part of the picture, and the importance of that factor will increase in scale w/ the site's usage. The bigger impact, in my mind, is the impact to later changes to the site. Further, also as I said, it's sort of a slippery-slope approach that doesn't scale well in your dev cycle either. It's not *that* hard to make a grid-based layout using CSS (see 960 Grid (960.gs) and Blueprint CSS (www.blueprintcss.org) for examples)
Paul