HTML DOM Window resizeTo() Method Last Updated : 11 Jul, 2025 Comments Improve Suggest changes Like Article Like Report The HTML Window resizeTo() Method is used to resize a window to the specified width and height. Syntax: window.resizeTo(width, height) Parameters: width: Sets the width of the window, in pixels.height: Sets the height of the window, in pixels. Example: In this example, we will resize the window by using the Window resize To() method. html <h1 style="color: green">GeeksforGeeks</h1> <p> Click the new window button to create a window and Resize Window button to resize the window </p> <button onclick="openWin()"> New window </button> <button onclick="resizeWin()"> Resize window </button> <script> var myWindow; function openWin() { myWindow = window.open("", "", "width=100, height=100"); } function resizeWin() { myWindow.resizeTo(300, 300); myWindow.focus(); } </script> Output: Supported Browsers: The browser supported by Window resizeTo() Method are listed below: Google Chrome 1Edge 12Internet Explorer 4Mozilla Firefox 1Opera 12.1Safari 1 We have a Cheat Sheet on Javascript where we covered all the important topics of Javascript to check those please go through Javascript Cheat Sheet-A Basic guide to JavaScript. Comment More infoAdvertise with us Next Article HTML DOM Window outerWidth Property V Vijay Sirra Follow Improve Article Tags : Web Technologies HTML HTML-DOM Similar Reads HTML DOM Window resizeBy() Method The resizeBy() method in HTML Window is used to resize a window by the specified amount, relative to its current size. Syntax: resizeBy(width, height) property value: width: A that specifies the resize pixels of width.height: A that specifies the resize pixels of height. Example: html <!DOCTYPE h 1 min read HTML DOM Window moveTo() Method The moveTo() method is used in the window to moves the window from the left and top coordinates. Syntax: window.moveTo(x, y) Parameter: x: A positive or negative number that specifies the horizontal coordinate to be moved toy: A positive or negative number specifies the vertical coordinate to be mov 1 min read HTML DOM Window moveBy() Method The Window moveBy() method is used for moving a window with a specified number of pixels relative to its current coordinates. The Window moveBy() method accepts two parameters x and y which denote the number of pixels to move the window horizontally and vertically. Syntax: window.moveBy(x, y)Paramet 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 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 HTML DOM Window screenX Property The Window screenX property is used for returning the 'x' or the horizontal coordinates of a window relative to the screen. It returns a number which represents the horizontal distance of a window relative to the screen in pixels. Syntax: window.screenX Return Value: It returns a number that represe 1 min read Like