HTML | height Attribute
The HTML | height attribute is used to specify the height of the Element. It can be used on the following elements:
Example: This Examplle illustrates the use of height attribute in <canvas> element.
<!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> |
chevron_right
filter_none
Output:

Supported Browsers: The browser supported by HTML height Attribute are listed below:
- Google Chrome
- Internet Explorer
- Firefox
- Opera
- Safari
Recommended Posts:
- HTML | <img> height Attribute
- HTML | <td> height Attribute
- HTML | <th> height Attribute
- HTML | <object> height Attribute
- HTML | <iframe> height Attribute
- HTML | <input> height Attribute
- HTML | <video> height Attribute
- HTML | <video> height Attribute
- HTML | <canvas> height Attribute
- HTML | Screen height Property
- HTML | DOM Video height Property
- HTML | DOM IFrame height Property
- HTML | DOM Object Height Property
- HTML | DOM Style height Property
- HTML | <img> alt Attribute
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



