Open In App

HTML | <fieldset> form Attribute

The HTML | <fieldset> form Attribute is used to specify the one or more forms that the <fieldset> element belongs to
Syntax: 

<fieldset form="form_id">

Attribute Values: 



Example:  




<!DOCTYPE html>
<html>
 
<head>
    <title>
        HTML fieldset form Attribute
    </title>
    <style>
        h1,
        h2,
        .title {
            text-align: center;
        }
         
        fieldset {
            width: 50%;
            margin-left: 22%;
        }
         
        h1 {
            color: green;
        }
    </style>
</head>
 
<body>
    <h1>GeeksforGeeks</h1>
    <h2>
      HTML &lt;fieldset&gt;
      form Attribute
  </h2>
    <form id="mygeeks">
        <div class="title">
            Suggest article for video:
        </div>
    </form>
   
    <fieldset form="mygeeks">
        <legend>JAVA:</legend>
        Title:
        <input type="text">
        <br> Link:
        <input type="text">
        <br> User ID:
        <input type="text">
    </fieldset>
    <br>
    <fieldset form="mygeeks">
        <legend>PHP:</legend>
        Title:
        <input type="text">
        <br> Link:
        <input type="text">
        <br> User ID:
        <input type="text">
    </fieldset>
 
</body>
 
</html>

Output : 
 



Supported Browsers: The browser supported by HTML <fieldset> form Attribute are listed below: 


Article Tags :