table code
4 December 2006

i used tables, so sue me...

when css became mainstream there was an immediate backlash of tables… and i joined the bandwagon… but so much so that i became “blind”, some things are tables indeed.. doh !

I was the master of tables once upon a time … give me a design and I could reproduce with some healthy chopping in photoshop and COLSPAN/ROWSPANS ... I could do no wrong … I was invincible …

I then stopped web programming for a few years, and then when I came back in 2003, I was ready to start hacking away again … surely my skills at tables weren’t yet obsolete… but then I started reading up on CSS and I realized … CSS was more than getting rid of the <font> tag … I was wrong it wasn’t going to be as simple as I expected… i was moving from the highly predictable and tested <TABLE> world to unpredictable CSS...

Was I wrong using tables back in the day? Semantically yes, but seriously speaking there was no other way … it just had to be done.

So I slowly but surely read and got up to speed, I started out lightly with some hybrid layouts ... felt dirty … but time is of essence in the working world… but soon i was fairly up to speed with the wealth of people and resources helping out …. and then it happened … i turned anti tables ...

oh how i loathed tables, and turned my nose up at anyone who used them…

So I moved from hacking photoshop files to tables, into adding in hacks into css … but I separated content from from design … all was right in the world… surely I had to add extra markup for certain designs that caused some browsers to fail… oh the stupid box model

fwiw …. i really do prefer ie’s view of the box model, but bad bad them for not following the spec…

When i did my own design… I was able to predict what would require a hack and designed around it, but when you don’t do your own designs, then sometimes you have to… I still stray away from those comment type hacks that take advantage of browser bugs…

So… I was anti table … then on one project (can’t remember which one) ... I remember pulling my hair out … and then someone who came by … and said why are you doing that use tables… I was about to come back with my clever semantic argument … then i realized ... what i was coding indeed could be considered a table … after all it was called a TABLE OF CONTENTS...

it then dawned on me … i was so anti table i failed to see when something was a table.

From what I have seen, no one uses tables for comments, but it doesn’t mean I am wrong to do it … it’s tabular data … “COMMENT” / “WHO SAID IT AND WHEN” ... in terms of accessibility this makes complete sense… just make sure when you use tables add <TH>‘s … I have them … they are just hidden with css, visually it’s easy to see the association… but screen readers read them…

Now I can see someone misinterpreting or taking this to another level not intended … sure a multi column layout could be conceived as a table … like my internal pages “ARTICLE CONTENT” / “COMMENTS” ... I am not advocating nor will I do that, but if you did do it make sure to add <TH>‘s ... but seriously a table should have more than one big row…

Here is an excellent article, on the same subject, and more in depth of how to use tables: Bring on the tables

All I am saying … sometimes things are tables, so code them as <TABLES>‘s…

[digg it]


I am here to see the table live …

Daniel Bulli2

How about this, will this be a second row. Ha, I kill me.


One interesting note is how effective tables are across different browsers. CSS is very difficult to replicate the same look & feel. I won’t sue you… I have tables in many of my sites.

Doug Karr

I agree that some layouts are more difficult (sometimes near impossible) to reproduce with CSS, especially when the coder and designer are different entities, but there are several sites which help you along.

Tables are more try and tested, but I can’t advocate for them in a non accessible way… using them as a pure layout technique IMHO is still not ideal … but I can see how one’s hand can be forced … knock on wood … i haven’t had to use one for non-tabular data for sometime… and got a few grey hairs to show for it.

Daniel Bulli2

Heh, pretty interesting read.

Tables for table data! It only makes sense. Though yes, at this point I would also probably miss it for a complex arrangement of DIVs and shoot myself in a foot.

I’m liking your comments table! Nifty.


I know how you feel, I was an old table devotee and I’ve been switching over to pure css design since we need to adapt quite a bit of content and template design quickly. My boss still hasn’t let me roll out the new versions, lol. I think I’m pretty decent at it now, but there is definitely a time and place for pure css and a place for table design. I’ve stuggled to get complex form layouts to display consistently with pure css when I should have just used tables…

Mario Noble

Say, what kind of editor are you using? The photo at the top looks like an editor I’d like to try. :-?

Erlend Larsen

It’s BBEdit 8 … it’s kinda expensive but I have been using the suite now for so long. I took that at work I haven’t committed on buying yet, and I have been using their cheaper(free) brother Textwrangler at home.

Heard good things and tried liked Textmate, but alas the workflow is a little different and not sure if it will be as easy for me to leave what I know.

If you not using anything right now, I would check and recommend the cheaper Textmate out.

Daniel Bulli2

Couldn’t agree more! Its nice that people have got the message about tables being bad for layouts, but there is life in the old beast yet!

html tables and css nazism


Site has been moved is no longer being updated. Please head over to for new content