I dont know anything about DTD.
http://www.bls.gov/oco/ocos292.htm
See how fieldset is used outside of form on this page and it's cool! I love the style!
I dont know anything about DTD.
http://www.bls.gov/oco/ocos292.htm
See how fieldset is used outside of form on this page and it's cool! I love the style!
Yes, because the fieldset element is used to group related form fields.
FIELDSET
is a regular block level element and can be used in any place where block level elements are allowed (except in a BUTTON
element).
I think the question and chosen answer in this question are misleading. Whether or not a form
has to have a fieldset
, and whether or not a fieldset
has to be in a form
are two different questions with two different answers.
According to the HTML4.01 spec, a fieldset is a valid element inside of a form, but as it is a standard block-level element, it is also acceptable elsewhere: http://www.w3.org/TR/html401/interact/forms.html#h-17.10 http://www.w3.org/TR/html401/sgml/dtd.html#block
I can not, however, imagine a use case where this would be done, unless you are using the fieldset for decorating, which would be incorrect usage.
A form however, does not require a fieldset: http://www.w3.org/TR/html401/interact/forms.html#h-17.3
Ok, if you put a filedsed outside a form the page validates, but I don't see any good reason to do it, and if you read the xhtml 1.0 DTD you find this comment in the fieldset section: