Sander Aarts wrote:
> Does a form not have a sort of Q&A going on then!?
Hello Sander,
If one tries hard enough, it seems anything can be considered a list of
sorts.
For example: A web page is a list of headings and content paragraphs, but we
wouldn't use a list to layout an entire web page, so we instead use the
appropriate mark-up: Headings and paragraphs.
A form is a list of controls and their related inputs, but we wouldn't use a
list to organize form controls, so we'd use fieldsets/legends, labels and
inputs. Using the Q&A scenario which you might use to try and justify the
use of a DL to organize a form, let's swap out the elements with their
appropriate ones (which need to be used anyway).
DL = Fieldset
?? = Legend
DT = Label (the "Q")
DD = Input (the "A")
It seems to me the form has everything we need to properly organize it. Once
it's made we can add then a few styles and layout rules with CSS to make it
look good. This means the DL isn't needed and would serve only as extraneous
mark-up.
On my contact form I use something like this:
<form>
<fieldset>
<legend>My Form</legend>
<fieldset>
<legend>"Required" Contact Info</legend>
<label>Name: <input /></label>
<label>Email: <input /></label>
</fieldset>
<fieldset>
<legend>"Optional" Contact Info</legend>
<label>Phone: <input /></label>
<label>Web Site: <input /></label>
</fieldset>
<fieldset>
<legend>"Required" Message</legend>
<label>Your Comments: <textarea /></label>
</fieldset>
<input value="Submit" />
</fieldset>
</form>
See a real (somewhat styled) example: http://green-beast.com/gbcf/ (Demo
Form)
Using this is satifies all of the needs of users and spec requirements. No
definition list necessary or needed.
That's my thinking on it anyway. I certainly wasn't trying to make a case
for using a list, any list, for a form.
Cheers.
Mike Cherim
*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************