Embed height property
Example
Modify the height of the embedded file to 500 pixels:
document.getElementById("myEmbed").height="500";
Try it »
Definition and Usage
The height property is used to set or return
The height property describes the height of the embedded file, in pixels.
**Tip:** Use width Use the property to set
Browser support





All major browsers support the height property.
Syntax
Return the height property:
embedObject
.height
Set the height property:
embedObject
.height=
pixels
Attribute values
| Value | Description |
|---|---|
| pixels | Describes the height of the embedded content, in pixels. (e.g. height="100") |
Technical Details
| Return Value: | Number, representing the height of the embedded file, in pixels. |
|---|
More examples
Example
Return the height of the embedded file:
var x = document.getElementById("myEmbed").height;
x
The output is:
200
Try it »
Example
Modify the height and width of the embedded file to 500 pixels:
document.getElementById("myEmbed").height="500";
document.getElementById("myEmbed").width="500";
Try it »
Related pages
HTML Reference Manual: HTML
Embed object