[thelist] where should form inputs go for valid xhtml?
Hershel Robinson
hershel at galleryrobinson.com
Thu Aug 10 16:15:29 CDT 2006
> That's where I'm unsure - doesn't the <form> tag itself serve this
> purpose? If so, adding a <fieldset> inside the <form> would be
> redundant. That's why I think of it as being unnecessary. And I don't
> really want to add unnecessary tags just for the sake of validation -
> otherwise I'd take the easy road and just wrap each label/field pair in
> a <p> tag and be done with it :)
>
> I guess it's a question of semantics and whether this:
> <form>
> <fieldset>
> <label></label><input />
> </fieldset>
> </form>
> is more correct than this:
> <form>
> <label></label><input />
> </form>
I am uncertain if this is purely semantics. The <form> tag indicates
that all of its controls are meant to considered as a set, but is that
set intended to be a set of individual controls or a set of fieldsets?
If the former, then using a fieldset as in your first code above would
be indeed superfluous. If, however, a <form> is meant to be a set of
fieldsets, then what you have is a simple case of a set of one, but it
would be semantically only correct to code it as in your first example.
Hershel
PS: I am not generally one for musing theoretical about HTML semantics,
but sometimes these things happen. :)
--
Web Site Construction by Gallery Robinson
http://galleryrobinson.com/
More information about the thelist
mailing list