HTML DOM Embed object
Embed object
The Embed object is new in HTML5.
The Embed object represents an HTML element.
Accessing the Embed Object
You can use getElementById() to access an element.
var x = document.getElementById("myEmbed");
Try it
Creating the Embed Object
You can use document.createElement() to create an element.
var x = document.createElement("myEmbed");
Try it
Embed Object Properties
| Property | Description |
|---|---|
| height | Sets or returns the height of the embedded file (height attribute value). |
| src | Sets or returns the src attribute value of the embed element (embedded file address). |
| type | Sets or returns the type attribute value of the embed element (embedded file type). |
| width | Sets or returns the width of the embedded file (width attribute value). |
Standard properties and events
The Embed object also supports standard property and Events.
Related Articles
HTML Reference Manual: HTML