HTML legend Tag

Example

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

Teach Yourself  by BH24 HTML Editor Tool!

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

Definition and Usage

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