The <legend> tag is used for labelling the fieldset element. By using the fieldset tag and the <legend> tag, you can make your forms much easier to understand for your users. The <fieldset> tag is used to group the form elements whilst the <legend> tag provides a label for the fieldset.

Example Code:
    <legend>Personal Information:</legend>
    Name: <input type="text" size="30" /><br />
    Email: <input type="text" size="30" /><br />
    Date of birth: <input type="text" size="10" />
Personal Information: Name:
Date of birth:
Attribute Definition
align For alignment. Top, left, top, bottom. This attribute is deprecated
Global Attributes:

The <legend> tag also supports the Global Attributes in HTML5

Event Attributes:

The <legend> tag also supports the Event Attributes in HTML5

Last updated on 2 August 2018 By Rene Spronk

View All HTML Tags

Errors? Please help to keep this list up to date, If you find any errors, please contact us, so that we can get them fixed.