HTML DOM removeAttribute() Method Last Updated : 13 Jun, 2023 Comments Improve Suggest changes Like Article Like Report The DOM removeAttribute() method is used to remove an attribute with specified name from the element. It is similar to the removeAttributeNode() method but the difference is that the removeAttributeNode method is used to remove the specified attribute object, but on the other hand, removeAttribute removes the attribute with the specified name. Syntax: element.removeAttribute(name) Where name is the string that specifies the name of the attribute to remove from the element. It is the required field. Example: In this example, we will use DOM removeAttribute() Method. HTML <!DOCTYPE html> <html> <head> <title> HTML DOM removeAttribute Method </title> <style> .gfg { color: green; } </style> </head> <body style="text-align: center;"> <h1 style="color:green;"> GeeksforGeeks </h1> <h2> DOM removeAttribute Method </h2> <p id="p" class="gfg"> A computer science portal for geeks. </p> <button onclick="Geeks()"> Click Here! </button> <script> function Geeks() { //Remove class attributes from 'p' element. document.getElementById( "p").removeAttribute("class"); } </script> </body> </html> Output: Supported Browsers: The browser supported by the removeAttribute() method are listed below: Google Chrome 1Edge 12Internet Explorer 5Firefox 1Opera 8Safari 1 Comment More infoAdvertise with us V Vishal Chaudhary 2 Follow Improve Article Tags : Web Technologies HTML Web technologies HTML-DOM HTML-Methods +1 More Similar Reads HTML DOM DFN Object The DOM DFN Object is used to represent the HTML <dfn> tag. The DFN element is accessed by getElementById(). Syntax: document.getElementById("ID"); Where âidâ is the ID assigned to the âdfnâ tag. Example 1: In this example, we will use DOM DFN Object. html <!DOCTYPE html> <html> 1 min read HTML DOM Style animation Property The style animation property makes it possible to animate transitions from one CSS style to another CSS style. It configures the timing, delay, duration, and other details of how the sequence of animation should progress. The animation contains two components, one is CSS describing the component and 3 min read HTML | DOM WheelEvent deltaY Property The WheelEvent.deltaY property in HTML is used to return a positive double value when the web page is scrolled down, and a negative double value when the page is scrolled up, or else it returns zero. It is a read-only property. Syntax: event.deltaY Return Value: It returns a double value which indic 1 min read HTML DOM Style borderBottomRightRadius Property The DOM borderBottomRightRadius property is used to select any element from the DOM tree and set the style of the radius of the bottom-right corner of its border. Syntax : It returns the borderBottomRightRadius Property.object.style.borderBottomRightRadiusIt is used to set the borderBottom property. 2 min read HTML | DOM Style borderBottomWidth Property The style borderBottomWidth property in HTML DOM is used to set or return the width of bottom border of an element. Syntax: It is used to return the width of bottom border.object.style.borderBottomWidthIt is used to set the width of the bottom border.border-bottom-width: "medium|thin|thick|length|in 2 min read HTML DOM Style animationDuration Property The Style animationDuration property in HTML DOM is used to set the time interval to complete one cycle of an animation. Syntax: It returns the animationDuration property.object.style.animationDurationIt sets the animationDuration property.object.style.animationDuration = "time|initial|inherit" Retu 3 min read HTML DOM offsetTop Property The DOM offsetTop property is used to return the top position which is relative to the top of the offsetParent element. Syntax: object.offsetTop Return Value: A number in the pixel unit represents the top position of the element. Example: In this example, we will use DOM offsetTop property HTML < 1 min read HTML DOM Style animationIterationCount Property The Style animationIterationCount property in HTML DOM is used to set or return how many times an animation should be played. Syntax: It is used to return the animationIterationCount property.object.style.animationIterationCountIt is used to set the animationIterationCount property.object.style.anim 2 min read HTML DOM WheelEvent deltaX Property The WheelEvent.deltaX property in HTML is used to return a positive double value when the web page is scrolled horizontally along the left or right direction. If the page is scrolled to the right it returns a positive value, and a negative double value when scrolled to the left, else it returns zero 1 min read HTML DOM offsetHeight Property The DOM offsetHeight property is used to return the layout height of an element as an integer. It is measured in pixels. It includes height, border, padding, and horizontal scrollbars but not margin. If the element is hidden then it returns 0. Syntax: element.offsetHeight Return Value: It returns th 2 min read Like