A lot of misconceptions exist about tables, and historical problems with accessibility and mobile contexts are to blame. But then, so is David Siegal.
Siegal wrote this truly awful book called Creating Killer Web Sites (Hayden), which unleashed a whole wave of hacksâthe single-pixel spacer GIF and layout tables being the most intractableâon the web design public. It took years before Cascading Style Sheets (CSS) arrived and began to stem the tide. (In his defense, Siegal did apologize for having âruined the Webâ in 1997.)
But then came the backlash. With the web standards movement of the early 2000s, the pendulum swung toward madness in the opposite direction. Web standards advocates pushed back against using tables for layout so strenuously that many began to believe that tables themselves were bad. We have had people tell us that their site policy is to not use tables. At all. Even for tabular data!
So, letâs reset. Tables for data are good. (Really, really good.)
Thatâs what tables are designed to do: relay data. The best way to mark up
multivariate data, from census results to phone lists to sports scores, is
with a table. Got it? Great. Tell your crazy friend whoâs still doing it
all with div
s to read Chapter 6.
On the other hand, tables for layout arenât so good.
If you must keep using your layout tables, make sure that theyâre streamlined as much as possible and that the visual order they indicate is the same as the way theyâre read in a screen reader. That is the real problem being masked by layout table hysteria. If thatâs not a problem for you, and you like how your site renders on mobile devices, take your time extricating yourself from the situation, and focus on higher-priority fixes. Ultimately, though, in the interest of making the experience better for all of your users, you should do what is necessary to wean yourself off of layout tables.
Get Universal Design for Web Applications now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.