Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

HTML | Window resizeBy() Method

  • Difficulty Level : Basic
  • Last Updated : 26 Jul, 2019

The resizeBy() method in HTML Window is used to resize a window by the specified amount, relative to its current size.


resizeBy(width, height)

property value:

  • width: A that specifies the resize pixels of width.
  • height: A that specifies the resize pixels of height.


<!DOCTYPE html>
      Window resizeBy() Method
        h1 {
            color: green;
          Geeks for Geeks
        <button onclick="openWin()">
          New window
        <button onclick="resizeWin()">
          Resize window
            var myWindow;
            function openWin() {
                myWindow = 
        "", "",
                              "width=100, height=100");
            function resizeWin() {
                myWindow.resizeBy(300, 300);



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

  • Google Chrome
  • Mozilla Firefox
  • Edge
  • Opera
  • Safari

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!