HTML | 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.innerHeight
Below program illustrates the Window innerheight Property:
Returning the current frame’s height.
<!DOCTYPE html> <html> <head> <title>Window innerHeight Property in HTML</title> <style> h1 { color: green; } h2 { font-family: Impact; } body { text-align: center; } </style> </head> <body> <h1>GeeksforGeeks</h1> <h2>Window innerHeight Property</h2> <p>For returning the current frame's height, double click the "Check Height" button: </p> <button ondblclick="height()">Check Height</button> <p id="measure"></p> <script> function height() { var h = window.innerHeight; document.getElementById("measure").innerHTML = "Frame's Height: " + h; } </script> </body> </html> |
chevron_right
filter_none
Output:

After clicking the button

Supported Web Browsers
- Opera
- Internet Explorer
- Google Chrome
- Firefox
- Apple Safari
Recommended Posts:
- JavaScript | Window innerWidth and innerHeight Properties
- HTML | Window name Property
- HTML | Window self( ) Property
- HTML | Window top( ) Property
- HTML | Window screenTop Property
- HTML | Window screenY Property
- HTML | Window screenLeft Property
- HTML | Window screenX Property
- HTML | DOM Window parent Property
- HTML | Window sessionStorage( ) Property
- HTML | DOM Window closed Property
- HTML | DOM Window status Property
- HTML | Window outerHeight Property
- HTML | Window innerWidth Property
- HTML | Window length Property
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



