Below examples will illustrate all the property’s usage:
HTML screen.width Property: The screen.width property returns the user’s screen width in pixels.
The Screen width is 1600
HTML screen.height Property: The screen.height property returns the users screen height in pixels.
The screen height is 900
HTML screen.availWidth Property: The screen.availWidth property returns the users screen width in pixels, excluding the interface features.
The available screen width is 1549
HTML screen.availHeight Property: The screen.availHeight property returns the users screen height in pixels excluding the interface features.
The available screen height is 876
HTML screen.colorDepth Property: The screen.colorDepth property returns the bits (number) to be used to display one color. Usually, 24-bit or 32-bit hardware is used for color resolution. 24 bits = 16, 777, 216 different (True Colors) 32 bits = 4, 294, 967, 296 different (Deep Colors)
The screen color depth is 24
HTML screen.pixelDepth Property: The screen.pixelDepth property returns the pixel depth of the screen.
The screen pixel depth is 24
- Google Chrome 1 and above
- Edge 12 and above
- Firefox 1 and above
- Internet Explorer 4 and above
- Opera 12.1 and above
- Safari 1 and above
Please Login to comment...