[aida] To div or not

Eli Green eli.green at mac.com
Wed Jan 28 11:51:18 CET 2009


HTML purists will tell you that <table> should only be used for data that is in fact tabular. For laying out the various blocks of a page, DIVs are in fact the "blessed" approach. This preserves the semantic structure of your HTML document and in fifty years when Google has in fact developed into some kind of artificial intelligence, that might matter.

But nested tables ala HTML 3 can get really ugly quite quickly when you try to read the code. I don't know if it's still true, but browsers used to render a page with a bunch of separate DIVs much faster than one with a dozen nested tables.

I would say that you should use DIV when you can: header, footer, menus, main content, etc. On the other hand, the act of laying out forms nicely without the use of tables has always seemed to me to be an exercise in masochism. So the exception to the above rule for me has always been forms with pairs of labels/input widgets. If somebody is willing to correct me, I will eat my words.


On Wednesday, January 28, 2009, at 11:25AM, "Nicholas Moore" <nicholas.moore at tsr-i.com> wrote:
>My ignorance of html has been exposed by a comment about the advantages
>of div over table for layout.
>I see that in Aida a divTag is invoked automatically if attributes are
>set. Does anyone have any comments about the appropriate use of divs
>against tables?
>*Nicholas J Moore*

More information about the Aida mailing list