- Can Fieldsets be nested?
- When should Fieldset be used?
- Does a Fieldset have to be in a form?
- Can you have a Fieldset without a legend?
Can Fieldsets be nested?
The <fieldset> and <legend> elements are also used when there are multiple questions about the same topic. It is possible to nest one <fieldset> element inside another, but it is not recommended.
When should Fieldset be used?
The fieldset element is used to group related form controls and their labels within a web form. To mark-up for the fieldset includes a Start and an End tag. Multiple fieldset elements can be included inside a single form. In this example, there's a fieldset for contact details and a second fieldset for account details.
Does a Fieldset have to be in a form?
Yes, because the fieldset element is used to group related form fields.
Can you have a Fieldset without a legend?
A fieldset cannot be used without a legend and visa versa.