tags:

views:

240

answers:

5

Currently, my form looks like this:

<label for="comment">Comment:</label>
<textarea name="comment" id="comment" rows="6" cols="20"></textarea><br />

<label for="checker">Check the box:</label>
<input type="checkbox" name="checker" id="checker" value="ON" />

Should these then be converted to <dt>/<dd> since they're somewhat definition lists, or am I taking this too far?

A: 

You would be taking it too far unless there is another reason to add definitions to your form. Definitions are not semantically applicable to forms.

SoloBold
A: 

It's absolutely fine as it is, leave it be if it works.

If you need surrounding containers around the label/input pairs, add uls and lis. I think they are the semantically more correct choice here.

Pekka
A: 

I tend to use fieldsets to group related fields as appropriate, and then a OL around them. Each LI has a label and an input. They aren't really definitions, more a list of things.

Parrots
A: 

Unless you expect this HTML to be consumed by some particular tool or other automated service, DL/DT is not appropriate. A form is not a glossary.

gWiz