< All the HTML Tags >

<legend></legend>

Video Coming Soon...

  • legend

    Tag Type

    block

    Tag Category

    forms

    Defines a caption for a <fieldset> element

    Viewed

    1

    Examples

    1

Definition:

The HTML <legend> tag is used to define a caption for a <fieldset>, providing a title or description for the grouped elements within the fieldset.

This tag helps enhance the accessibility and usability of forms by clearly indicating the purpose of the grouped controls.

Incorporating the `<legend>` tag improves the organization and understanding of form sections.

Attributes:

Global attributes (e.g., class, id, style)

Accessibility:

Coming Soon…

Default legend Example:

Using the <legend> tag to create a fieldset legend.
<fieldset><legend>Personal Information</legend></fieldset>

Default legend Result:


Coming Soon…

Community Examples:

Coming Soon…
Coming Soon…