HTML fieldset Tag

Example

Group related elements in a form:
<form>
  <fieldset>
    <legend>Personalia:</legend>
    Name: <input type="text"><br>
    Email: <input type="text"><br>
    Date of birth: <input type="text">
  </fieldset>
</form>

Teach Yourself  by BH24 HTML Editor Tool!

The <fieldset> tag is supported in all major browsers.

Definition and Usage

The <fieldset> tag is used to group related elements in a form.
The <fieldset> tag draws a box around the related elements.

Tips and Notes

Tip: The <legend> tag defines a caption for the <fieldset> element.