HTML legend tag

HTML legend tag is used to show title or captions for the fieldset elements.

This makes form elements much easier for the user to understand.



Person gender details


List of HTML legend tag attributes

Sr. No.Attribute optionsDescription
1alignThis option used to align text to the specified directions. The values for this are left, center, right, top and center.

Resources and References

1. W3C Specification.
2. HTML living standard
3. W3C project using Github

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.