<embed>
HTML DOM Embed object
Embed object
Embed objects are new in HTML5.
An Embed object represents an HTML <embed> element.
Access Embed objects
You can use getElementById() to access the <embed> element:
var x = document.getElementById("myEmbed");
Create an Embed object
You can use document.createElement() to create <embed> elements:
var x = document.createElement("myEmbed");
Embed object attributes
Attribute | Description |
---|---|
height | Set or return the height of the embedded file (height attribute value) |
src | Set or return the src attribute value (embedded file address) of the embed element |
type | Set or return the type attribute value of the embed element (embedded file type) |
width | Set or return the width of the embedded file (width property value) |
Standard Properties and Events
Embed objects also support standard properties and events .
Related articles
HTML Reference Manual: HTML <embed> Tag