[thelist] <fieldset> and <legend> vs <h2>
Bill Moseley
moseley at hank.org
Wed Jun 27 07:12:47 CDT 2007
I tend to use fieldsets with every form, even for forms that have a few
elements.
Is it appropriate to use if the form only has a single field?
<form>
<fieldset>
<legend>Name</legend>
<input type="text" name="name" />
</fieldset>
<div><input type="submit" /></div>
</form>
It's been recommended that this is overkill and should use <h2> for
the legend instead (and I assume wrap the fields in some block-level
tag).
Seems appropriate since we are using it for most forms anyway --
doesn't seem like the number of fields (or number of fieldsets) should
make a difference.
--
Bill Moseley
moseley at hank.org
More information about the thelist
mailing list