Embed height Property
Example
Change the height of an embedded file to 500 pixels:
document.getElementById("myEmbed").height = "500";
Try it Yourself »
Definition and Usage
The height property sets or returns the value of the height attribute in an <embed> element.
The height attribute specifies the height of the embedded content, in pixels.
Tip: Use the width property to set or return the value of the width attribute in an <embed> element.
Browser Support
Property | |||||
---|---|---|---|---|---|
height | Yes | Yes | Yes | Yes | Yes |
Syntax
Return the height property:
embedObject.height
Set the height property:
embedObject.height=pixels
Property Values
Value | Description |
---|---|
pixels | Specifies the height of the embedded content in pixels (e.g. height="100") |
Technical Details
Return Value: | A Number, representing the height of the embedded content, in pixels |
---|
More Examples
Example
Return the height of an embedded file:
var x = document.getElementById("myEmbed").height;
The result of x will be:
200
Try it Yourself »
Example
Change the height and width of an embedded file to 500 pixels:
document.getElementById("myEmbed").height = "500";
document.getElementById("myEmbed").width = "500";
Try it Yourself »
Related Pages
HTML reference: HTML <embed> height attribute
Embed Object