HTML DOM offsetTop Property Last Updated : 13 Jun, 2023 Comments Improve Suggest changes Like Article Like Report 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 <!DOCTYPE html> <html> <head> <style> #offsetdiv { top: 80px; margin: 20px; padding: 10px; width: 350px; position: absolute; border: 5px solid green } </style> </head> <body> <h3>Geeks for Geeks</h3> <h3>HTML DOM offsetTop property</h3> <div id="offsetdiv"> <p> <button onclick="GFGfunction()">Try it</button> </p> <p>offsetTop is: <span id="gfg"></span></p> </div> <script> function GFGfunction() { let x = document.getElementById("offsetdiv"); document.getElementById("gfg").innerHTML = offsetdiv.offsetTop; } </script> </body> </html> Output: Supported Browsers: 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 S ShivamGupta63 Follow Improve Article Tags : JavaScript Technical Scripter 2018 Similar Reads HTML | DOM DList Object The DOM DList Object is used to represent the HTML <dl> tag. The Dlist element is accessed by getElementById(). Syntax: document.getElementById("ID");< Where âidâ is the ID assigned to the âdlâ tag.Example-1: html <!DOCTYPE html> <html> <head> <title>HTML DOM DList O 2 min read HTML DOM insertBefore() Method The insertBefore() method in HTML DOM is used to insert a new node before the existing node as specified by the user. Syntax: node.insertBefore( newnode, existingnode ) Parameters: This method accepts two parameters as mentioned above and described below: newnode: It is the required parameter. This 2 min read HTML DOM attributes Property The attributes property in HTML DOM returns the group of node attributes specified by NamedNodeMap objects. The NamedNodeMap object represents the collection of attribute objects and can be accessed by index number. The index number starts at 0. Syntax: node.attributes Return Value: It returns the N 2 min read 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 Like