Skip to content
Related Articles

Related Articles

Improve Article

HTML | height Attribute

  • Last Updated : 14 Sep, 2021
Geek Week

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

 

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

My Personal Notes arrow_drop_up
Recommended Articles
Page :