The Wayback Machine - https://web.archive.org/web/20240930162854/https://www.geeksforgeeks.org/html-fieldset-form-attribute/
Open In App

HTML | <fieldset> form Attribute

Last Updated : 21 Jul, 2022
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

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: 

  • form_id: It contains the value i.e form_id which specify the no. of forms that the <fieldset> element belongs to. The value of this attribute should be the id of the <form> element. 
     

Example:  

html




<!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: 

  • Google Chrome
  • Edge 12 and above
  • Internet Explorer
  • Firefox
  • Opera
  • Safari


Previous Article
Next Article

Similar Reads

How to achieve <fieldset> like effect without using <fieldset> tag ?
Forms are used to make a group for more understandable of all users and clients, as related data fields are easier to identify. It also makes it easier for users to concentrate on smaller and more clearly defined groups by understanding them one by one as an individual rather than try to grasp the entire form at once. The grouping has to be created
3 min read
HTML <fieldset> disabled Attribute
The disabled attribute for <fieldset> element in HTML is used to specify that the group of related form elements is disabled. A disabled fieldset is un-clickable and unusable. It is a boolean attribute. Syntax: <fieldset disabled>fieldset content...</fieldset> Example: C/C++ Code &lt;!DOCTYPE html&gt; &lt;html&gt;
1 min read
HTML | <fieldset> autocomplete attribute
The HTML <fieldset> autocomplete attribute is used to specify that the fieldset has autocompleted on or off value. When the autocomplete attribute is set to on the browser will automatically complete the values base on which the user entered before. Syntax: <fieldset autocomplete="on | off"> Attribute Values: on: It has a default value.
1 min read
HTML <fieldset> name Attribute
The HTML <fieldset> name Attribute is used to specify the name for the Fieldset element. It is used to reference the form data after submitting the form or to reference the element in JavaScript. Syntax: <fieldset name="text"> Attribute Values: It contains the value i.e. name which specifies the name for the fieldset element. Example: I
1 min read
HTML | DOM Fieldset form Property
The Fieldset form property in HTML DOM is used to set or return the reference to the form that containing the <fieldset> element. It is read-only property that returns a form object on success. Syntax: fieldsetObject.form Return Value : It returns a string value representing the reference of the form to which the fieldset element belongs. The
2 min read
HTML | DOM Fieldset disabled Property
The Fieldset disabled Property in HTML DOM is used to set or return whether a fieldset is disabled or not. A Disabled element is unusable and un-clickable and is usually rendered grey in color by Default. This Property is used to reflect the HTML disabled attribute. Syntax: It returns the disabled property:fieldsetObject.disabledIt is used to set t
2 min read
HTML | DOM Fieldset Object
The DOM Fieldset Object is used to represent the HTML <fieldset> element. The fieldset element is accessed by getElementById(). Properties: disabled: disabled property used to set or return whether a fieldset is disabled, or not.form: use to return a reference to the form that contains the fieldset.name: Value of name attribute of field is se
2 min read
HTML | DOM Fieldset name Property
The Fieldset name Property in HTML DOM is used to set or return the value of the name attribute of a fieldset element. The name attribute is used to specify the name of the fieldset field. If the name attribute is not specified in an input field then the data of that field would not be sent at all. Syntax: It returns the Fieldset name property. fie
2 min read
HTML | DOM Fieldset type Property
The DOM Fieldset type Property in HTML DOM is used to set or returning the which type of form element the fieldset is. It is a read-only property and will always return "fieldset". Syntax: fieldsetObject.type Return Value: It returns a string value, which represents the type of form element the fieldset is. Below Program that illustrates the use of
1 min read
How to specify a name for the fieldset using HTML ?
The <fieldset> tag in HTML5 is used to make a group of related elements in the form and it creates the box over the elements. The <fieldset> tag is new in HTML5. The HTML <fieldset> name attribute is used to specify the name for the fieldset element. It is used to reference the form-data after submitting the form or to reference t
1 min read
What is a Fieldset in HTML ?
The <fieldset> is used for grouping all the controls of the form together to give it a structured look. It adds a border around the form to give it a differentiated look from all the other parts of the web page. We can also use the <legend> tag to give a caption to the form which is included inside the <fieldset>. Syntax: <fiel
1 min read
How to define a caption for a fieldset element in HTML?
The legend element defines a caption for the fieldset element in HTML. It specifies the title or description for the grouped contents within the fieldset. The fieldset element contains child elements, including the legend element, which serves as its title. Syntax:<legend> Content... </legend>ApproachThe HTML document defines a form wit
2 min read
Angular PrimeNG Fieldset Toggleable
Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. This article will show us how to use the Fieldset Toggleable in Angular PrimeNG. We will also learn about the properties, along with their syntaxes th
3 min read
Angular PrimeNG Fieldset Component
Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. In this article, we will know how to use the Fieldset component in Angular PrimeNG. We will also learn about the properties, events & styling alon
3 min read
Blaze UI Input Disabled Fieldset
Blaze UI is an open-source CSS framework. It is a lightweight UI toolkit that provides great tools for building customized and scalable applications. It can work with any framework that exists. It can adapt to any ecosystem. All designs or CSS are mobile-first and hence responsive. Its project is available open-source so a large community maintains
2 min read
Flex / Grid layouts not working on button or fieldset elements
This article will explore why Flex and Grid layouts do not work on button and fieldset elements, and how we can overcome this issue. Flex and Grid layouts are powerful CSS tools used for designing responsive and dynamic web pages. However, these layouts may not work as expected on certain HTML elements, including buttons and fieldset. This is becau
3 min read
Angular PrimeNG Fieldset Regular
Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. This article will show us how to use the Fieldset Regular in Angular PrimeNG. We will also learn about the properties, along with their syntaxes that
3 min read
Angular PrimeNG Fieldset Properties
Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. In this article, we will see how to use the different available Fieldset Properties in Angular PrimeNG. Fieldset Component is a grouping component tha
4 min read
Angular PrimeNG Fieldset Styling
Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. This article will show us Fieldset Styling in Angular PrimeNG. Fieldset Component is a grouping component that takes a header along with some content
3 min read
Angular PrimeNG Fieldset Custom Legend
Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. This article will show us different Fieldset Custom Legend in Angular PrimeNG. Fieldset Component is a grouping component that takes a header along wi
3 min read
Angular PrimeNG Fieldset Templates
Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. In this article, we will see how to use the different available Fieldset Templates in Angular PrimeNG. The Fieldset Component is a grouping component
3 min read
Angular PrimeNG Fieldset Animation Configuration
Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. In this article, we will see how to use the different available Fieldset Animation Configuration in Angular PrimeNG. The Fieldset Component is a group
3 min read
HTML5 fieldset Tag
The <fieldset> tag in HTML5 is used to make a group of related elements in the form. This tag is a new addition in HTML5, serving as a container for grouping form elements. The <legend> tag is used to define the title for the child's contents. The legend elements are the parent element. Note: The <fieldset> tag also supports the G
3 min read
How href attribute is different from src attribute in HTML ?
In HTML5, the href and src attributes play distinct roles in defining paths or URLs, each associated with specific HTML elements. The href attribute, commonly found in an anchor (<a>) elements, points to the destination of hyperlinks, facilitating navigation. The src attribute, used with elements like <img> and <script>, specifies
1 min read
What is the significance of adding autocomplete attribute in HTML Form ?
The HTML <form> autocomplete attribute is used to specify that the form has autocompleted on or off value. When the autocomplete attribute is set to "on", the browser will automatically complete the values based on which the user entered before. Syntax: <form autocomplete="on|off"> Attribute values: on: It has a default value. When the
1 min read
HTML <form> autocomplete Attribute
The HTML <form> autocomplete Attribute is used to specify that the form has autocompleted on or off value. When the autocomplete attribute is set to on the browser will automatically complete the values base on which the user entered before. Syntax: <form autocomplete="on|off"> Attribute Values: on: It has a default value. When the auto
1 min read
HTML | <button> form Attribute
The HTML <button> form Attribute is used to specify the one or more forms that the <button> element belongs to. Syntax: <button form="form_id"> Attribute Values: form_id: It Contains the value i.e form_id which specify the one or more than the button element belongs to. The value of this attribute should be id of the <form>
1 min read
When to use the novalidate attribute in HTML Form ?
The HTML novalidate attribute is a boolean attribute used to specify that the form-data should not be validated when submitting the form. It can be used with the HTML <form> element. It can be used in situations where you want the user to save the progress of form filling or if the form validation is disabled, the user can easily save the for
1 min read
HTML <form> target Attribute
In this article, we will see how to open the new tab in HTML using <form> target Attribute, along with understanding its implementation through the examples. The <form> target Attribute in HTML is used to specify whether the submitted result will open in the current window, a new tab, or on a new frame ie., this attribute specifies a na
2 min read
HTML | <form> name Attribute
The HTML <form> name Attribute is used to specify the name of a form Element. It is used to reference the form-data after submitting the form or to reference the element in a JavaScript. Syntax: <form name="name"> Attribute Values: It contains a single value name which describes the name of the <form> element. Example: C/C++ Code
1 min read