HTML DOM Embed height Property
Definition and Usage
The height property sets or returns the value of the height attribute of the <embed> element.
The height property describes the height of the embedded content, in pixels.
Tip: Use the width property to set the value of the width attribute of the <embed> element.
Browser Support
All major browsers support the height property.
Syntax
Return the height property:
_embedObject_.height
Set the height property:
_embedObject_.height=_pixels_
Property Values
| Value | Description |
|---|---|
| pixels | Describes the height of the embedded content, in pixels. (e.g., height="100") |
Technical Details
| Return Value: | A number, representing the height of the embedded file, in pixels. |
|---|
More Examples
Example
Change the height of the embedded file to 500 pixels:
document.getElementById("myEmbed").height="500";
Example
Return the height of the embedded file:
var x = document.getElementById("myEmbed").height;
The x output will be:
200
Example
Change the height and width of the embedded file to 500 pixels:
document.getElementById("myEmbed").height="500";
document.getElementById("myEmbed").width="500";
Related Pages
HTML Reference: HTML <embed> height Attribute
YouTip