Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Screen width Property

Screen width Property

Screen Object Reference Screen object


Definition and Usage

The width property declares the width of the screen that displays the browser, in pixels.

Syntax

screen.width


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the width property


Example

Example

Return the total width of your screen:

The output of the above example is:

Try it »


More examples

This example contains all screen properties


Screen Object Reference Screen object