Open In App

HTML | <object> height Attribute

Last Updated : 19 Jul, 2022
Comments
Improve
Suggest changes
Like Article
Like
Report

The HTML <object> height attribute is used to specify the height of the object element in terms of pixel. 

Syntax: 

<object height="pixels">

Attribute Values:

  • pixels: It holds the height of the object in terms of pixels.

Below example illustrates the <object> height attribute in HTML: 

Example: 

html
<!DOCTYPE html> 
<html> 

<head>
    <title>
        HTML object height Attribute
    </title>
</head>

<body style="text-align:center;"> 
    
    <h2>HTML object height Attribute</h2> 
    
    <object id="myobject" width="400"
                height="200" data= 
"https://media.geeksforgeeks.org/wp-content/uploads/geek-8.png"> 
    </object> 

</body> 

</html>

Output:

  

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

  • Google Chrome
  • Edge 12
  • Internet Explorer
  • Firefox 1
  • Safari
  • Opera

Next Article

Similar Reads