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 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
Bumping because no one gave a valid use case for a fieldset sans form. A valid reason to use a fieldset without a form is when you are using the inputs to gather information for a dynamic display. Each change of an input makes a difference in the displayed information. There is no sense of filling out a form and clicking submit. You could put a form around the fieldset, but it would be useless. The fieldset, however, visually groups the inputs used to control the display, (or game or whatever).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With