The embed height property in HTML DOM is used to set or return the value of the height attribute. The height attribute defines the height of the embedded content in terms of pixels.
Syntax:
- Return the height property:
embedObj.height
-
Set the height property:
embedObj.height = pixels
Property Values:
- px: Specify the height in pixels of the embedded content.
Return value: It returns a number to show the height of embedded content.
Example:
<!DOCTYPE html> <html> <head> <title> HTML DOM Embed height Property </title> </head> <body> <center> <h1 style="color:green"> GeeksforGeeks </h1> <embed id="embedID" height="400" <br> <button onclick="GFGfun()"> Try it </button> <p id="pid"></p> <script> function GFGfun() { var idheight = document.getElementById("embedID").height; document.getElementById("pid").innerHTML = idheight; } </script> </center> </body> </html> |
Output:
Before click on button:

After click on button:

Example:
<!DOCTYPE html> <html> <head> <title> HTML DOM Embed height Property </title> </head> <body> <center> <h1 style="color:green"> GeeksforGeeks </h1> <embed id="embedID" <br> <button onclick="GFGfun()"> Try it </button> <p id="pid"></p> <script> function GFGfun() { var idheight = document.getElementById("embedID").height = 400; document.getElementById("pid").innerHTML = idheight; } </script> </center> </body> </html> |
Output:
- Before clicking the button:

- After clicking the button:

Supported Browsers: The browsers supported by DOM embed height property are listed below:
- Google Chrome
- Internet Explorer
- Firefox
- Apple Safari
- Opera
Recommended Posts:
- HTML | <embed> height Attribute
- HTML | DOM Embed src Property
- HTML | DOM embed type property
- HTML | DOM embed width property
- HTML width/height Attribute vs CSS width/height Property
- HTML | DOM Embed Object
- HTML | <embed> Tag
- HTML | <embed> type Attribute
- HTML | <embed> src Attribute
- HTML | <embed> width Attribute
- HTML | DOM Style height Property
- HTML | DOM Object Height Property
- HTML | DOM Video height Property
- HTML | DOM IFrame height Property
- HTML | DOM input image height Property
- Semantic-UI | Embed
- How to embed images in New Google Sites ?
- How to embed tables in New Google Sites ?
- How to embed Scrolling Text Banners in New Google Sites ?
- HTML | Screen height Property
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.


