VOOZH about

URL: https://www.geeksforgeeks.org/html/html-dom-window-resizeto-method/

⇱ HTML DOM Window resizeTo() Method - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

HTML DOM Window resizeTo() Method

Last Updated : 11 Jul, 2025

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. 

Output: 

👁 Image
 

Supported Browsers: The browser supported by Window resizeTo() Method are listed below:

  • Google Chrome 1
  • Edge 12
  • Internet Explorer 4
  • Mozilla Firefox 1
  • Opera 12.1
  • Safari 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
Article Tags: