We all know that it is wrong to use a Table as a layout aid.
I often use tables to structure forms.
Is this semantically correct?
I am wondering about this as it is logical for a form to be in a table layout (at least the forms that I create), as all the fields have labels that correspond to the expected input into the fields.
The data obtained is then definitely semantically correct displayed in a table.
But is it the same for the form?
I have a feeling that it is a matter of opinion, but I am interested to hear people’s reasoning behind their opinions.
============
EDIT : Thanks @Will Martin.
Actually, I checked, it would seem that using table to structure form IS semantically correct as it is displayed on w3c standards document. See here : http://www.w3.org/TR/html401/interact/forms.html#h-17.9.1
============
I’ve read an article (unfortunately in french) yesterday that was basically saying that you shouldn’t use table to structure forms. (http://www.alsacreations.com/article/lire/1209-display-inline-block.html)
It doesn’t say why not but it says that you should use the display:inline-block. Be carefull though, display:inline-block is a great parameter but it has drawbacks when browsing IE7-6 (not surprisingly).
Read this article (in english) that explains ‘inline-block’ => http://robertnyman.com/2010/02/24/css-display-inline-block-why-it-rocks-and-why-it-sucks/