HTML | Screen availHeight Property
The Screen availHeight property is used for returning the height of the user’s screen, in pixels. The value returned by the Screen availHeight property is excluding the interface features like the Windows Taskbar.
Syntax :
screen.availHeight
Below program illustrates the Screen availHeight property Property :
Getting the height of the user screen.
<!DOCTYPE html> <html> <head> <title> Screen availHeight property in HTML </title> <style> h1 { color: green; } h2 { font-family: Impact; } body { text-align: center; } </style> </head> <body> <h1>GeeksforGeeks</h1> <h2>Screen availHeight property</h2> <p> or returning the screen size, double click the "Screen Height" button: </p> <button ondblclick="screen_height()"> Screen Height </button> <p id="height"></p> <script> function screen_height() { var h = "Screen Height: " + screen.availHeight + "px"; document.getElementById("height").innerHTML = h; } </script> </body> </html> |
Output:

After clicking the button

Supported Browsers: The browser supported by Screen availHeight are listed below:
- Google Chrome
- Internet Explorer
- Firefox
- Opera
- Safari
Recommended Posts:
- HTML | Screen height Property
- HTML | Screen availWidth Property
- HTML | Screen width Property
- HTML | Screen pixelDepth Property
- HTML | Screen colorDepth Property
- What is the difference between “screen” and “only screen” in media queries?
- HTML | DOM name Property
- HTML | DOM li value Property
- HTML | DOM specified Property
- HTML | DOM Bdo dir Property
- HTML | DOM value Property
- HTML | DOM id Property
- HTML | DOM URL Property
- HTML | DOM dir Property
- HTML | DOM Button name 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.



