![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
HTML DOM Object Height Property
The HTML DOM Object Height property is used to set or return the height of an object. This height is set in pixels.
Following is the syntax to set the height of an object: objObject.height
Following is the syntax to return the height of an object −
objObject.height = pixels
Above, pixels is the value set for the height of object.
Let us now see an example to implement the DOM object height property −
Example
<!DOCTYPE html> <html> <body> <object id="newObj" width="580" height="200" data="https://www.tutorialspoint.com/flex/samples/CSSApplication.swf" style="border:2px solid red"></object> <p>Click to update the height.</p> <button onclick="display()">Update Height</button> <p id="myid"></p> <script> function display() { document.getElementById("newObj").height = "350"; } </script> </body> </html>
Output
Now, click the “Update Height” button to change the height −
Advertisements