HTML <legend> tag

HTML <legend> tag : Definition


• The <legend> tag is used to define a <caption>/<title> for the content of its parent <fieldset> tag.

• The <legend> element must be the first child of its <fieldset> tag.

Html <legend> tag example


Output: