HTML <legend> Element Reference

The HTML <legend> element captions the controls grouped by a fieldset.

<legend>

HTML <legend> Element Reference

The HTML <legend> element captions the controls grouped by a fieldset.

Categories

  • Forms

Tag omission

Consult the HTML Living Standard for the precise tag-omission rules.

Content model

  • Detailed content-model guidance will be added to this reference.

Attributes

Examples

Example

A practical legend element example.

<fieldset>
  <legend>Choose a theme</legend>
  <label><input type="radio" name="theme"> Light</label>
</fieldset>

Related references

Description

The HTML <legend> element captions the controls grouped by a fieldset.

References

  1. HTML Living Standard: Index of elements
  2. MDN: HTML <legend> Element

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies