GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • MDN
  • HTML: Markup language
  • Elements
  • Global attributes
  • Attributes
  • See all…
  • Responsive images
  • HTML cheatsheet
  • Date & time formats
  • See all…
  • SVG
  • MathML
  • XML
  • CSS: Styling language

This view

  • Original page
  • New address

GeezerVison is showing developer.mozilla.org — Screen - Web APIs | MDN

Screen

Baseline
Widely available
*

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

* Some parts of this feature may have varying levels of support.

  • See full compatibility
  • Learn more

The Screen interface represents a screen, usually the one on which the current window is being rendered, and is obtained using window.screen.

Note that browsers determine which screen to report as current by detecting which screen has the center of the browser window.

Instance properties

Also inherits properties from its parent EventTarget.

Screen.availHeight Read only

Specifies the height of the screen, in pixels, minus permanent or semipermanent user interface features displayed by the operating system, such as the Taskbar on Windows.

Screen.availWidth Read only

Returns the amount of horizontal space in pixels available to the window.

Screen.colorDepth Read only

Returns the color depth of the screen.

Screen.height Read only

Returns the height of the screen in pixels.

Screen.isExtended Read only Secure context

Returns true if the user's device has multiple screens, and false if not.

Screen.orientation Read only

Returns the ScreenOrientation instance associated with this screen.

Screen.pixelDepth Read only

Gets the bit depth of the screen.

Screen.width Read only

Returns the width of the screen.

Screen.mozEnabled

Boolean. Setting to false will turn off the device's screen.

Screen.mozBrightness

Controls the brightness of a device's screen. A double between 0 and 1.0 is expected.

Non-standard properties

The following properties are specified as part of the Window Management API, which makes them available on the ScreenDetailed interface; this is where we have chosen to document them. However, non-standard versions of these properties are available on the Screen interface in browsers that don't support that API. See this page's Browser compatibility table for details of the non-standard support.

Screen.availLeft Read only Secure context

A number representing the x-coordinate (left-hand edge) of the available screen area.

Screen.availTop Read only Secure context

A number representing the y-coordinate (top edge) of the available screen area.

Screen.left Read only Secure context

A number representing the x-coordinate (left-hand edge) of the total screen area.

Screen.top Read only Secure context

A number representing the y-coordinate (top edge) of the total screen area.

Instance methods

Also inherits methods from its parent EventTarget.

Screen.lockOrientation

Lock the screen orientation (only works in fullscreen or for installed apps)

Screen.unlockOrientation

Unlock the screen orientation (only works in fullscreen or for installed apps)

Events

change Secure context

Fired on a specific screen when it changes in some way — width or height, available width or height, color depth, or orientation.

orientationchange

Fires when the screen orientation changes.

Examples

js
if (screen.colorDepth < 8) {
  // use low-color version of page
} else {
  // use regular, colorful page
}

Specifications

Specification
CSSOM View Module
# the-screen-interface

Browser compatibility

Help improve MDN

Learn how to contribute

This page was last modified on Oct 5, 2026 by MDN contributors.

View this page on GitHub • Report a problem with this content
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.