<fieldset>



HTML <fieldset> Tag


The <fieldset> tag is used to group a set of controls under a container.

The <fieldset> tag is often used together with the <legend> tag to give meaningful content information about the <form> control content.


Example :

<form>
  <fieldset>
    <legend>Contact Details</legend>
    <label>Email Address: <input type="email" name="email" /></label><br><br>
    <label>Phone Number: <input type="text" name="phone" /></label><br><br>
    <input type="submit" value="submit">
  </fieldset>
</form>

Output :