YouTip LogoYouTip

Prop Embed Height

HTML DOM Embed height Property

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

Internet ExplorerFirefoxOperaGoogle ChromeSafari

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";

Try it yourself Β»

Example

Return the height of the embedded file:

var x = document.getElementById("myEmbed").height;

The x output will be:

200

Try it yourself Β»

Example

Change the height and width of the 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

← Prop Embed SrcDom Obj Embed β†’