<legend> tag in HTML

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

  • Open and close tag required of <legend>.

Example of <legend> tag

Result Look Like

Student Information: Name of Student:
Email of Student:
Date of birth:

<legend> Tag Browser Support

All modern and old browser supports <legend> tag, the list of browsers mentioned below:

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

Global Attributes

Event Attributes

Attributes

Align attribute is not supported in HTML5:

Attribute Value Description
align top
bottom
left
right
Defines the alignment of the caption

Email Us: advertise@gdatamart.com

Donate Us: Support to GDATAMART

© 2023 GDATAMART.COM (All Rights Reserved)