3 ms·
Form data (which is what the original poster asked about) arguably _is_ tabular data, containing both header and data cells. I use the table header (<th>) tag f
by robenkleene 16y ago
Form data (which is what the original poster asked about) arguably _is_ tabular data, containing both header and data cells. I use the table header (<th>) tag for form labels and the table data (<td>) for form fields all the time. (Although it is marginally better not to do so, if your design allows it.)
The dogmatic view, that marking up your document with as few, strictly semantic tags as possible is ideal, has died down in recent years. I advocate the following approach: create your design and initial as-semantic-as-possible HTML. Starting doing the CSS, you run into problems that a table would help with? Either adapt the design, or just put in the table -- your guiding light should be semantic markup is great, but it isn't worth adding hard-to-maintain HTML/CSS hacks to your design in order to keep your markup perfect.
In otherwords, HTML/CSS hacks are worse than some bad markup here and there.
Always keep in mind that the HTML/CSS revolution was a _blogging_ movement. Usually keeping the markup strictly semantic is easy for a blog, as blogs are textual documents -- the type of data that and HTML/CSS were originally designed for.
I personally mainly work on web applications (think lots of buttons and forms), HTML/CSS perform far worse in this context. And I've wasted a lot of time extrapolating what is good advice for a blog to web applications were it can be terrible advice.