HTML Tag: legend
Field set caption, used with fieldset
elements in forms.
The element should appear directly after the opening fieldset
tag.
Optional Attributes
Example
<form action="fieldsetdemo/">
<fieldset>
<legend>Personal details</legend>
<label for="yourname">Your name:</label> <input name="yourname" id="yourname">
<label for="yourage">Your age:</label> <input type="number" name="yourage" id="yourage">
</fieldset>
<fieldset>
<legend>Your address</legend>
<label for="housenumber">House number:</label> <input type="number" name="housenumber" id="housenumber">
<label for="street">Street:</label> <input name="street" id="street">
<label for="postcode">Zip code / post code:</label> <input name="postcode" id="postcode">
</fieldset>
<input type="submit">
</form>