Frontend Development

what is <legend> for?

Submitted by Lcasta07, , Thread ID: 207613

Thread Closed
Lcasta07
Newbie
Level:
1
Reputation:
0
Posts:
15
Likes:
0
Credits:
30
30-05-2021, 01:16 AM
#1
Idk what it is for help pls

RE: what is <legend> for?

Fishbone
Newbie
Level:
1
Reputation:
0
Posts:
14
Likes:
0
Credits:
14
01-06-2021, 11:52 PM
This post was last modified: 01-06-2021, 11:53 PM by Fishbone
#2
I don't know if you've already figured it out, but the <legend> tag basically defines a caption for a <fieldset> (set of fields in a form). You can see an example here of how it might be used. It helps visually group the fields together and helps for accessibility. This is what it might look like:

[Image: e6kosgW.png]

"Personalia" is the <legend> tag, and the rest are fields. It's grouped by <fieldset>.

Users browsing this thread: 1 Guest(s)