Easy Tutorial
❮ Att Link Type Tag Center ❯

HTML <legend> Tag

Example

Group related elements in a form:


Browser Support

Most browsers currently support the <legend> tag.


Tag Definition and Usage

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


Differences Between HTML 4.01 and HTML5

The "align" attribute has been deprecated in HTML 4.01 and is not supported in HTML5. It is not recommended to use it. Please use CSS to set the alignment of the <legend> element.


Attributes

Attribute Value Description
align top <br>bottom <br>left <br>right Not supported in HTML5. Deprecated in HTML 4.01. Not recommended. Use styles instead. <br>Defines the alignment of the caption within the fieldset.

Global Attributes

The <legend> tag supports global attributes. View the complete list of HTML Global Attributes.


Event Attributes

The <legend> tag supports all HTML Event Attributes.

❮ Att Link Type Tag Center ❯