How to Create a field set and legend in html?

SEOSIKHO 00:26:00

The <fieldset> tag is used to group related elements in a form.

The <fieldset> tag draws a box around the related elements.
The <legend> tag defines a caption for the <fieldset> element.

Example

<!DOCTYPE html>
<html>
<body>

<form>

 <fieldset>

  <legend>Personal information:</legend>

  Name: <input type="text"><br>
  Email: <input type="text"><br>
  Date of birth: <input type="text"> <br>
  password:<input type="password">
 </fieldset>

</form>

</body>
</html>


Output:













Share this

Related Posts

Previous
Next Post »