Get the Screen object.window.screen describes the display for this window.
Read the property.height is the full vertical size in CSS pixels.
Check the type.typeof screen.height is "number".
Your value differs. Resolution and OS scaling change the number you see.
Example 2 — MDN Occupied-Space Check
Compare full height with available height — MDN’s teaching pattern.
JavaScript
if (window.screen.availHeight !== window.screen.height) {
console.log("Something is occupying some screen real estate!");
} else {
console.log("Full height appears available");
}
Screen metrics.height / availHeight describe the display.
Window metric.innerHeight is the layout viewport of this tab.
Resize the browser. Only innerHeight changes; screen values stay put.
Rule of thumb. Layout → innerHeight; display size → screen.height.
Compatibility
Browser Support
Screen.height is Baseline Widely available (MDN: since July 2015). It works in all modern desktop and mobile browsers.
✓ Baseline · Widely available
Screen.height
Full screen height in CSS pixels — supported everywhere you teach modern JavaScript.
98%Widely available
Google ChromeAll versions · Desktop & Mobile
Full support
Mozilla FirefoxAll versions · Desktop & Mobile
Full support
Apple SafariAll versions · macOS & iOS
Full support
Microsoft EdgeAll versions · Chromium & Legacy
Full support
Internet ExplorerIE 6+ · Legacy environments
Full support
OperaAll modern versions
Full support
screen.heightExcellent
Bottom line: Safe for production. Use height for full display height; availHeight for usable vertical space; innerHeight for this window’s viewport.
Frequently Asked Questions
A read-only number: the full height of the screen in CSS pixels. Access it as window.screen.height or screen.height.
No. MDN marks it as Baseline Widely available (since July 2015). It is not Deprecated, Experimental, or Non-standard.
screen.height is the full screen height. availHeight is the space available for web content and is never larger—often smaller when a taskbar, Dock, or menu bar stays visible.
No. height is the monitor’s full height. innerHeight is this browser window’s viewport height and changes when you resize the tab.
No. It is read-only. You read the value; assigning to it has no effect for web content sizing.
Use screen.width for the full screen width in CSS pixels—the horizontal twin of height.