HTML DOM Window pageXOffset Property Last Updated : 15 Jun, 2023 Summarize Comments Improve Suggest changes Share Like Article Like Report The Window pageXOffset property is used for returning the pixels of the current document which have been scrolled from the upper left corner of the window horizontally. It is a read-only property and it returns a number which represents the number of pixels that the document has already been scrolled from the upper left corner of the window horizontally.Syntax: window.pageXOffset Return Value: It returns a Number that represents the number of pixels which the document has already been scrolled from the upper left corner of the window, horizontally. Below program illustrates the Window pageXOffset Property :Getting the pixels that the document has already been scrolled from the upper left corner of the window horizontally. html <!DOCTYPE html> <html> <head> <title> Window pageXOffset Property in HTML </title> <style> h1 { color: green; } h2 { font-family: Impact; } body { text-align: center; } div { border: 2px black; background-color: yellow; height: 100px; width: 2000px; } </style> </head> <body> <h1>GeeksforGeeks</h1> <h2>Window pageXOffset Property</h2> <p> For returning pixels that the document has already been scrolled from the upper left corner of the window horizontally, double click the "Check pageXOffset" button: </p> <button ondblclick="offset()" style="position:fixed;"> Check pageXOffset </button> <div> </div> <script> function offset() { window.scrollBy(100, 100); alert("pageXOffset : " + window.pageXOffset); } </script> </body> </html> Output: After clicking the button Supported Browsers: The browser supported by Window pageXOffset Property are listed below: Google Chrome 1 and aboveEdge 12 and aboveInternet Explorer 9 and aboveFirefox 1 and aboveOpera 3 and aboveSafari 1 and above Comment More infoAdvertise with us Next Article HTML DOM Window name Property S Shubrodeep Banerjee Follow Improve Article Tags : Web Technologies HTML HTML-Property Similar Reads HTML | Window pageYOffset Property The Window pageYOffset property is used for returning the pixels of the current document which have been scrolled from the upper left corner of the window vertically. It is a read-only property and it returns a number that represents the number of pixels that the document has already been scrolled f 2 min read HTML DOM Window name Property The Window name property is used for setting or returning the name of a window. It is generally used to modify the name of a window which has been created in the past. It returns a string which represents the name of the window.Syntax: window.name Return Value: It returns a string value that represe 2 min read HTML DOM Window outerWidth Property The window outerWidth property is used for returning the outer width of the browser window. It includes all the interface elements such as toolbars, scrollbars, etc. It is a read-only property and returns a number which represents the width of the browserâs window in pixels. Syntaxwindow.outerWidthR 1 min read HTML DOM Window outerHeight Property The window outerHeight property is used for returning the outer height of the browser window. It includes all the interface elements such as toolbars, scrollbars, etc. It is a read-only property and returns a number which represents the height of the browser's window in pixels. Syntax: window.outerH 1 min read HTML DOM Window innerHeight Property The Window innerHeight property is used for returning the height of a window's content area. It is a read-only property and returns a number which represents the height of the browser window's content area in pixels. Syntax: window.innerHeightReturn Value: It returns a number that represents browser 1 min read HTML DOM Window innerWidth Property The Window innerWidth property is used for returning the width of a window's content area. It is a read-only property and returns a number which represents the width of the browser window's content area in pixels.Syntaxwindow.innerWidthReturn Value: It returns a number that represents the browser wi 1 min read Like