<

HTML <legend> Tag

The <legend> tag defines a caption for the <fieldset> element.

Example




<!DOCTYPE html>
<html>
<body>

<form>
 <fieldset>
  <legend>Personal Info:</legend>
  Name: <input type="text"><br>
  Email: <input type="text"><br>
  Date of birth: <input type="text">
 </fieldset>
</form>

</body>
</html>
















© copyright 2017-2022 Completedone pvt ltd.