HTML CSS Bootstrap Javascript Icons Python
JavaScript Reference
Overview
JS Reference
JS Array Object JS Boolean Object JS Date Object JS Style Declaration Object JS Error Object JS Global Object JS Math Object JS Number Object JS String Object JS RegExp Object JS Statements
DOM Reference
DOM Attribute DOM Console DOM Document DOM Element DOM Events DOM Event Objects DOM History DOM HTMLCollection DOM Location DOM Navigator DOM Screen DOM Style DOM Window WEB Storage

The Screen Object

The screen object contains information about the user's screen.

It can be used to display screen width, height, colorDepth, pixelDepth etc.

The screen object is part of the window object and can be written without the window prefix.

Screen Object Properties

The following table lists the properties of the Screen object:

Property Description
availHeight Returns the height of the screen (excluding the Windows Taskbar)
availWidth Returns the width of the screen (excluding the Windows Taskbar)
colorDepth Returns the color depth of the screen
height Returns the total height of the screen in pixels
pixelDepth Returns the bit depth of the screen
width Returns the total width of the screen in pixels