Window screen.height
Example
Get the total height of your screen:
let height = screen.height;
Try it Yourself »
More "Try it Yourself" examples below.
Definition and Usage
The height
property returns the total height of the user's screen.
The height
property returns the height in pixels.
The height
property is read only.
Note
Use the width property to get the total width of the user's screen.
Syntax
screen.height
Return Value
Type | Description |
A number | The total height of the user's screen in pixels. |
More Examples
All screen properties:
let text = "Total width/height: " + screen.width + "*" + screen.height + "<br>" +
"Available width/height: " + screen.availWidth + "*" + screen.availHeight + "<br>" +
"Color depth: " + screen.colorDepth + "<br>" +
"Color resolution: " + screen.pixelDepth;
Try it Yourself »
Browser Support
screen.height
is supported in all browsers:
Chrome | Edge | Firefox | Safari | Opera | IE |
Yes | Yes | Yes | Yes | Yes | Yes |