HTML <legend> Tag


When grouping related items in an HTML form, the legend tag is used to provide a caption for the <fieldset> tag.

The <legend> element is another popular name for this tag.

Syntax

Example

Preview

Supported Browsers

Element Chrome Firefox Safari Edge / IE Opera
<legend> Yes Yes Yes Yes Yes