Window screen.height Property

Definition and usage

height The property returns the total height of the user's screen.

height The property returns the height in pixels.

height The property is read-only.

Tip:Use width attribute Get the total width of the user's screen.

Example

Example 1

Get the total height of the screen:

let height = screen.height;

Try it yourself

Example 2

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

Syntax

screen.height

Return value

Type Description
Number Total height of the user's screen (in pixels).

Browser support

All browsers support screen.height:

Chrome IE Edge Firefox Safari Opera
Chrome IE Edge Firefox Safari Opera
Support Support Support Support Support Support

Related pages

screen.availHeight attribute

screen.availWidth attribute

screen.height attribute

screen.width attribute