Skip to content
Related Articles
Open in App
Not now

Related Articles

HTML | height Attribute

Improve Article
Save Article
  • Last Updated : 14 Sep, 2021
Improve Article
Save Article

The HTML | height attribute is used to specify the height of the Element. It can be used on the following elements: 

Example: This Example illustrates the use of height attribute in <canvas> element.  

HTML




<!DOCTYPE html>
<html>
 
<head>
    <title>
      HTML | height Attribute
  </title>
</head>
 
<body style="text-align:center">
    <h1>GeeksForGeeks</h1>
    <h2>HTML | height Attribute</h2>
    <!-- canvas Tag starts here -->
    <canvas id="GeeksforGeeks"
            width="200"
            height="100"
            style="border:1px solid black">
    </canvas>
    <!-- canvas Tag ends here -->
 
</body>
 
</html>

Output: 

Supported Browsers: The browser supported by HTML height Attribute are listed below:  

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

 

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!