The HTML <legend> tag is used for providing a title or explanatory caption for the rest of the contents of the legend element's parent element, usually it defines a caption for a fieldset. The element must appear directly after the opening fieldset tag.
The <legend> element can be used in conjuction with the <fieldset>, <##_tag-figure_##>, and <##_tag-details_##> elements.
By using the <legend> tag, you can make your forms and other elements much easier to understand for your users.
<fieldset> <legend> Address </legend> <label>Address Line 1</label> <input name="adressLine1" /> </fieldset>