How to display a fieldset in HTML?

HTMLWeb DevelopmentFront End Technology

The HTML <fieldset> tag is used for grouping related form elements and display fieldset. By using the fieldset tag and the legend tag, you can make your forms much easier to understand for your users.

Example

You can try to run the following code to display a fieldset in HTML −

<!DOCTYPE html>
<html>
   <head>
      <title>HTML fieldset Tag</title>
   </head>
   <body>
      <form>
         <fieldset>
            <legend>Details</legend>
            Student ID: <input type = "number"><br />
            Subjects:<input type = "text"><br />
         </fieldset>
      </form>
   </body>
</html>
raja
Published on 13-Mar-2018 07:09:33
Advertisements