HTML DOM offsetHeight Property Last Updated : 13 Jun, 2023 Comments Improve Suggest changes Like Article Like Report 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 the layout height of an element as an integer. Example 1: In this example, we will use DOM offsetHeight Property HTML <!DOCTYPE html> <html> <head> <title> DOM Style offsetHeight Property </title> <style> #GFG { height: 150px; width: 300px; padding: 10px; margin: 15px; background-color: green; } </style> </head> <body> <h2>DOM offsetHeight Property</h2> <div id="GFG"> <b>Information about this div:</b> <p id="sudo"></p> </div> <button type="button" onclick="Geeks()"> Submit </button> <script> function Geeks() { let element = document.getElementById("GFG"); let txt = "Height including padding and border: " + element.offsetHeight + "px"; document.getElementById("sudo").innerHTML = txt; } </script> </body> </html> Output: Example 2: In this example, we will use DOM offsetHeight Property HTML <!DOCTYPE html> <html> <head> <title> DOM Style offsetHeight Property </title> <style> #GFG { height: 150px; width: 300px; padding: 10px; margin: 15px; background-color: green; } </style> </head> <body> <h2>DOM offsetHeight Property</h2> <div id="GFG"> <b>Information about this div:</b> <br> <p id="sudo"></p> </div> <button type="button" onclick="Geeks()"> Submit </button> <script> function Geeks() { let element = document.getElementById("GFG"); let txt = ""; txt += "Height with padding: " + element.clientHeight + "px<br>"; txt += "Height with padding and border: " + element.offsetHeight + "px"; document.getElementById("sudo").innerHTML = txt; } </script> </body> </html> Output : Supported Browsers: The browser supported by DOM offsetHeight property are listed below: Google Chrome 1 and aboveEdge 12 and aboveInternet Explorer 5.5 and aboveFirefox 1 and aboveOpera 8 and aboveSafari 3 and above Comment More infoAdvertise with us M manaschhabra2 Follow Improve Article Tags : Web Technologies HTML Web technologies HTML-DOM HTML-Property +1 More Similar Reads HTML| DOM Variable Object The DOM Variable Object is used to represent HTML <var> element. The var element is accessed by getElementById(). Syntax: var element = document.getElementById("ID"); Where âidâ is the ID assigned to the âvarâ tag. Example-1: HTML <!DOCTYPE html> <html> <head> <title>HT 2 min read HTML DOM Style borderBottomLeftRadius Property The borderBottomLeftRadius property in HTML DOM is used to set or return the radius of the border of the bottom-left corner. Syntax: It returns the borderBottomLeftRadius Property.object.style.borderBottomLeftRadiusIt is used to set the borderBottomLeftRadius property.object.style.borderBottomLeftRa 2 min read HTML DOM Dialog Object The DOM Dialog Object is used to represent the HTML <dialog> element. The Dialog element is accessed by getElementById(). It is used in HTML5. Syntax: document.getElementById("ID"); Where âidâ is the ID assigned to the âDialogâ tag. Example 1: In this example, we will use DOM Dialog Object. HT 1 min read HTML DOM InputEvent inputType Property The inputType property is used to know the type of change that is made to a particular input field or any other editable content by the event. It is a read-only property. Syntax: event.inputType Return Value: It returns a string that indicates the type of input entered. Example: In this example, we 1 min read 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 Like