Skip to content
Related Articles

Related Articles

Improve Article

HTML | Screen height Property

  • Last Updated : 26 Jul, 2019

The Screen height property is used for returning the total height of a user’s screen. It returns the total height of the screen in pixels.



Below program illustrates the Screen height Property :

Checking the total height of a user’s screen.

<!DOCTYPE html>
      Screen height Property in HTML
        h1 {
            color: green;
        h2 {
            font-family: Impact;
        body {
            text-align: center;
    <h2>Screen height Property</h2>
      For checking the screen's total height, 
      double click the "Check Height" button: 
    <button ondblclick="check_height()">
      Check Height
    <p id="height"></p>
        function check_height() {
            var h = 
                "Total Screen Height In Pixels : " 
                                + screen.height;
            document.getElementById("height").innerHTML = h;


After clicking the button

Supported Browsers: The browser supported by Screen height are listed below:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Opera
  • Safari

Attention reader! Don’t stop learning now. Get hold of all the important Comcompetitivepetitve Programming concepts with the Web Design for Beginners | HTML  course.

My Personal Notes arrow_drop_up
Recommended Articles
Page :