HTML | DOM Fieldset Object Last Updated : 15 Jun, 2023 Comments Improve Suggest changes Like Article Like Report 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 set or returned by name.type: return the type of form. Syntax: document.getElementById("ID"); Where “id” is the ID assigned to the “fieldset” tag. Example 1: HTML <!DOCTYPE html> <html> <head> <title>HTML DOM Fieldset Object</title> <style> h1, h2, .title { text-align: center; } fieldset { width: 50%; margin-left: 22%; } h1 { color: green; } button { margin-left: 35%; } </style> </head> <body> <h1>GeeksforGeeks</h1> <h2>DOM fieldset Object</h2> <form> <div class="title"> Suggest article for video: </div> <fieldset id="GFG"> <legend>JAVA:</legend> Title: <input type="text"> <br> Link: <input type="text"> <br> User ID: <input type="text"> </fieldset> </form> <br> <button onclick="Geeks()">Submit</button> <script> function Geeks() { let g = document.getElementById("GFG"); // <!-- check the fieldset is disable or not --> g.disabled = true; // < !--name property of fieldset-- > g.name; } </script> </body> </html> Output: Example 2: Fieldset Object can be created by using the document.createElement Method. HTML <!DOCTYPE html> <html> <head> <title>DOM Fieldset Object</title> <style> h1, h2 { text-align: center; } h1 { color: green; } button { margin-left: 40%; } details { font-size: 30px; color: green; text-align: center; margin-top: 30px; } </style> </head> <body> <h1>GeeksforGeeks</h1> <h2>DOM Fieldset Object</h2> <button onclick="myGeeks()">Submit</button> <script> function myGeeks() { let g = document.createElement("FIELDSET"); g.setAttribute("id", "GFG"); document.body.appendChild(g); let f = document.createElement("LEGEND"); let text = document.createTextNode("JAVA"); f.appendChild(text); document.getElementById("GFG").appendChild(f); } </script> </body> </html> Output: Supported Browsers: The browser supported by DOM fieldset Object are listed below: Google ChromeInternet ExplorerFirefoxOperaSafari Comment More infoAdvertise with us M manaschhabra2 Follow Improve Article Tags : Misc Web Technologies HTML Web technologies HTML-DOM +1 More Practice Tags : Misc Similar Reads HTML DOM Textarea select() Method The select() method in HTML DOM is used to select the entire content of the text area or in a <input> element that includes a text field. Syntax: textareaObject.select() Parameters: This method does not accept any parameters. Return Value: It does not return any value. Example: In this example 1 min read HTML DOM removeChild() Method The HTML DOM removeChild() method is used to remove a specified child node of the given element. It returns the removed node as a node object or null if the node doesn't exist. Syntax: node.removeChild(child) Parameters: This method accepts a single parameter child which is mandatory. It represents 2 min read HTML DOM S Object The S Object in HTML DOM is used to represent the HTML <s> element. This tag is used to specify that the text content is no longer correct or accurate. The <s> element can be accessed by using the getElementById() method. Syntax: document.getElementById("id"); Where id is assigned to the 1 min read HTML DOM Style direction Property The Style direction property in HTML DOM is used to set or return the text direction of an element. Syntax: It is used to set the text direction.object.style.direction = "ltr|rtl|initial|inherit"It returns the text direction.object.style.direction Property Values: ltr: Specifies the direction as lef 2 min read HTML DOM Strong Object The Strong Object in HTML DOM is used to represent the HTML <strong> element. This tag is used to show the importance of the text. The strong element can be accessed by using the getElementById() method. Syntax: document.getElementById("id") Where id is assigned to the <strong> tag. Exam 2 min read HTML DOM Underline Object The DOM underline object is used to represent the HTML <u> element. The underline element is accessed by getElementById(). Syntax: document.getElementById("id"); Where 'id' is the ID assigned to the <u> tag. Example 1: In this example, we will use the DOM underline object. HTML <!DOCT 1 min read HTML DOM Kbd Object The Kbd Object in HTML DOM is used to represent the HTML <kbd> element. The <kbd> tag is the phrase tag and is used to define the keyboard input. The text enclosed by the <kbd> tag is typically displayed in the browserâs default monospace font. The <kbd> element can be access 2 min read HTML DOM Italic Object The Italic Object in HTML DOM is used to represent the HTML <i> element. This tag is used to display the content in italic style. The <i> element can be accessed by using the getElementById() method. Syntax: document.getElementById("id"); Where id is assigned to the <i> tag. Exampl 1 min read HTML DOM HashChangeEvent The HashChangeEvent in HTML DOM is an interface between the events that are triggered when the hash of the URL has been changed. The anchor part of the URL follows the # symbol. Supported Tags <body> Properties/Methods: newURL: This property is used to return the URL of the document after the 2 min read HTML DOM removeAttributeNode() Method The DOM removeAttributeNode() method is used to remove the specified attribute from the current element. It is similar to removeAttribute() method but the difference is that the removeAttribute method is used to remove the attribute with the specified name, but on the other hand removeAttributeNode 1 min read Like