Window innerHeight property

Definition and usage

innerHeight The property returns the height of the window content area.

innerHeight The property is read-only.

See also:

innerWidth property

outerWidth property

outerHeight property

Instance

Example 1

Get window height:

let height = window.innerHeight;

Try it yourself

let height = innerHeight;

Try it yourself

Example 2

All height and width properties:

let text =
"<p>innerWidth: " + window.innerWidth + "</p>" +
"<p>innerHeight: " + window.innerHeight + "</p>" +
"<p>outerWidth: " + window.outerWidth + "</p>" +
"<p>outerHeight: " + window.outerHeight + "</p>";

Try it yourself

Syntax

window.innerHeight

Or:

innerHeight

Return value

Type Description
Number The internal height of the browser window content area (in pixels).

Browser support

All browsers support window.innerHeight

Chrome IE Edge Firefox Safari Opera
Chrome IE Edge Firefox Safari Opera
Support 9-11 Support Support Support Support