A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/html/html-img-height-attribute/ below:

HTML | <img> height Attribute

HTML | <img> height Attribute

Last Updated : 22 Jul, 2022

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>GeeksforGeeks</h1>

    <h2>HTML img height Attribute</h2>

    <img src=
"https://media.geeksforgeeks.org/wp-content/uploads/20190506164011/logo3.png" 
         alt="GeeksforGeeks logo" 
         width="200px"
         height="200px">
</body>

</html>

Output:

  

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



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4