Window innerHeight

Example

Get the window height:

let height = window.innerHeight;
Try it Yourself »
let height = innerHeight;
Try it Yourself »

More examples below.


Description

The innerHeight property returns the height of a window's content area.

The innerHeight property is read only.


Syntax

window.innerHeight
or just:
innerHeight

Return Value

Type Description
A numberThe the inner height of the browser window's content area in pixels.


More Examples

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 »

Browser Support

window.innerHeight is supported in all browsers:

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


Copyright 1999-2023 by Refsnes Data. All Rights Reserved.