HTML legend tag
HTML <legend> tag defines the title or a caption of a form. Html legend element is used as a child of the fieldset element in a form.
<form action="" method="post" >
<fieldset><legend>Form </legend>
Name:<input type="text" name="sname"> <br>
Email:<input type="email" name="email"> <br>
</fieldset>
</form>
</>
Tag Uses
Specific uses of <a> tagIt simply specifies a title or a caption for the html form.
Tag omission
Both opening and closing tags are necessary for legend element.
Global Attributes
All the global attributes support the legend element.
Next Previous
Was this article helpful?