JavaScript Window innerHeight Tutorial

In this section, we will learn what Window innerHeight property is and how to use it in JavaScript.

JavaScript Window innerHeight Property

The `innerHeight` is a read only property that returns the height of the visual view-port, which is the visible area of the page on the screen. (The content area)

Note: the value of the `innerHeight` property changes if we zoom in or out of a page.

Also, this property is read-only.

Window innerHeight Property Syntax:


Example: JavaScript height of window



As we change the size of the browser, the value of the `innerHeight` will change as well

Example: get window size JavaScript



Leave a Reply