HTML | <img> height Attribute

The <img> height attribute is used to specify the height of the image in pixels. 

Syntax:

<img height="pixels">

Attribute Values: It contains single value pixels which specify the height of the image in pixel. 

Example: 

html




<!DOCTYPE html>
<html>
 
<head>
    <title>
        HTML img height Attribute
    </title>
</head>
 
<body>
    <h1>w3wiki</h1>
 
    <h2>HTML img height Attribute</h2>
 
    <img src=
"https://media.w3wiki.net/wp-content/uploads/20190506164011/logo3.png"
         alt="w3wiki logo"
         width="200px"
         height="200px">
</body>
 
</html>


Output:

  

Supported Browsers: The browser supported by HTML <img> height attribute are listed below:

  • Google Chrome
  • Edge 12 and above
  • Internet Explorer
  • Firefox
  • Safari
  • Opera

Contact Us