At what point does editable tabular data in HTML stop semantically being a table and start being a form?
-
Say for example you have a small table of key/value pairs, like a person's personal details. It would seem to me that an HTML table would be a semantically correct way of marking this up. However if you make the value's editable, could you still consider the data tabular enough to be marked up using a table? In that case, is something like a contact form not just technically a list of key/value pairs, and therefore tabular data?
-
Answer:
I don't think a table is the correct way to go. If you are asking for user input, you really should be using form elements. Tables are supposed to be used in presenting information, not collecting it. Tables are also not supposed to be used for layout purposes. Therefore I think what you want is a form. You could use CSS to create the look you want, but I think putting a form within a table is semantically incorrect and I would imagine also offers less accessibility.
Victoria Potvin at Quora Visit the source
Other answers
if you use the fieldset and label elements correctly with your form controls, you dont need a list or table or anything else. i wrap all controls in individual labels except for checkboxes. its really quite easy once you do it, you'll never need to use non form elements in your form again.
J. Albert Bowden II
Related Q & A:
- How to add primary key from multiple table as a foreign key in a table in sql server 2008?Best solution by stackoverflow.com
- What is Hash Table, how to create a hash table?Best solution by Stack Overflow
- What is an easy code for a form in PHP?Best solution by Stack Overflow
- What licenses would I need in order to start up a restaurant or general delivery/courier service?Best solution by Yahoo! Answers
- What is the best way to start up a local IT business?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.