[thelist] HTML Tables for layout rather than strictly for data presentaion

rudy r937 at interlog.com
Tue May 8 12:34:28 CDT 2001


> Why is it that if the "experts", w3c, Neilson, etc, all say not to use
> tables for layout, why do so many of us use tables primarily for layout?

hi joshua

because they work, and the alternatives don't

=o)

not to be too picky, but the w3c reference that you cited says "Content
developers should avoid using [tables] to lay out pages."

i'll go with the intent of *avoid* and will use tables whenever i have to

some designs, like floating right divs, will cost you weeks of your life,
wrestling to get them to work the same in all browsers, after which you
will be forced to admit that fundamental things like margin and padding are
implemented inconsistently, and either stay the course with css (à al
alistapart) or continue to use tables

so, for example, to float a sidebar right, i'll use <table align="right">
in a heartbeat

also -- and this is an important point, to me anyway -- the w3c says
"Tables should be used to mark up truly tabular information ("data
tables")."

okay, i've been in the data architecture business for a very long time, and
this is a topic i have argued many times

successfully

  <table border="0" cellpadding="0" cellspacing="0">
  <tr><th align="right">morning: </th><td>cereal/milk, coffee(s)</td></tr>
  <tr><th align="right">noon: </th><td>vegetables, water</td></tr>
  <tr><th align="right">dinner: </th><td>meat/potatoes/veggies,
beer(s)</td></tr>
  <tr><th align="right">evening: </th><td>more beer</td></tr>
  </table>

data is basically what you *want* it to be

this means i will often do stuff like the above not only because it's the
fastest way i know how to achieve that effect and i wouldn't know where to
begin to code the equivalent styles (nor trust them being cross-browser)...

... but also because the stuff in that table happens to *be* data

=o)


rudy.ca






More information about the thelist mailing list