Embed height attribute
Definition and usage
height
Attribute setting or returning the value of the height attribute of the <embed> element.
<embed> height attribute Define the height of the embedded content, in pixels.
Tip:Use width attribute Set or return the height attribute of the <embed> element. width attribute value.
See also:
HTML Reference Manual:HTML <embed> Tag
Example
Example 1
Change the height of the embedded file to 500 pixels:
document.getElementById("myEmbed").height = "500";
Example 2
Return the height of the embedded file:
var x = document.getElementById("myEmbed").height;
Example 3
Change the height and width of the embedded file to 500 pixels:
document.getElementById("myEmbed").height = "500"; document.getElementById("myEmbed").width = "500";
Syntax
Return the height attribute:
embedObject.height
Set the height attribute:
embedObject.height = pixels
Attribute value
Value | Description |
---|---|
pixels | Define the height of the embedded content, in pixels (for example, height="100"). |
Technical Details
Return Value: | Value, indicating the height of the embedded content in pixels. |
---|
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |
Related Pages
HTML Reference Manual:HTML <embed> height Attribute