Skip to main content

html-tags.com

<legend>

The caption of a fieldset, announced with every control inside the group.

Baseline: Widely available · Forms

When to use it

First child of fieldset, naming the group ('Delivery details', 'Payment method').

When not to

Only valid as fieldset's first child; keep it short — screen readers repeat it per control.

Example

<fieldset>
  <legend>Delivery details</legend>
  …controls…
</fieldset>
Source — this snippet needs a fuller context to render.

Authoritative references