Link to home
Start Free TrialLog in
Avatar of xberry
xberryFlag for Germany

asked on

better use table or div for structuring a web form ?

I wonder if it would be more adequate for web forms (mail-forms, order-forms, etc.) to structure
the form's elements (input, textarea) and the labels within table elements or within div elements.
I try to implement semantic html code for my site development.
So table element I only use for datasheets or anything else where
data are related to each other horizontally and vertically.
So using table for forms would just be ok, since the label on the left
(name, adress, etc.) is related to an input field (for anme, for adress, etc.)
on the right column. How do other experts see this, what is the modern
state of the art approach to forms ?
ASKER CERTIFIED SOLUTION
Avatar of R7AF
R7AF
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of xberry

ASKER

All three of you thanks for the helpful contribution.
So, table elements are gone now, too, for the forms ; )
I did follow R7AF's link with the list solution and took some
of the css quirks from the links that Eternal_Student gave to me
and combined it with it, so actually it works now in best semantic solution
without the javascript workaround needed.
Special thanks to JohnModig who told me from view as
a user as I haven't seen it so far and fully convinced me to throw
the table solution.