Skip to content
Related Articles

Related Articles

HTML | Window resizeBy() Method

View Discussion
Improve Article
Save Article
  • Difficulty Level : Basic
  • Last Updated : 04 Aug, 2022

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

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!