embed

< html‎ | elements
Jump to: navigation, search

EMBED

This article is In Progress.


W3C Working Draft

Summary

The HTML <embed> Element represents an integration point for an external content- typically, non-HTML content such as an application or some other type of interactive content which involves use of a third-party plugin as a handler (rather than being natively supported by the UA). The <embed> element is new in HTML5. The embed element is a void element. It means that embed element must have a start tag but must not have an end tag.


Overview Table

DOM Interface HTMLEmbedElement

interface HTMLEmbedElement : HTMLElement {

          attribute DOMString src;
          attribute DOMString type;
          attribute DOMString width;
          attribute DOMString height;
 legacycaller any (any... arguments);

};


Compatibility

Do you think this data can be improved? You can ask to add by opening an issue or make a pull request.

Desktop

FeaturesChromeFirefoxInternet ExplorerOperaSafari
Basic support
?
Yes
1.0
Yes
?
Yes
?
Yes
?
Yes

Examples

The following use of the EMBED element mimics the behavior of the BGSOUND tag.

HTML

<EMBED type="audio/x-midi" src="BackInTheSaddle.mid" hidden="true">

Way to embed a resource that requires a proprietary plugin, like Flash.If the user does not have the plugin (for example if the plugin vendor doesn't support the user's platform), then the user will be unable to use the resource.

HTML

<Embed src="catgame.swf">

To pass the plugin a parameter "quality" with the value "high", an attribute can be specified:

HTML

<Embed src="catgame.swf" quality="high">

Usage

The interactive element embed must not appear as a descendant of the a element. The interactive element embed must not appear as a descendant of the button element. The name attribute on the embed element is obsolete. Use the id attribute instead. The align attribute on the embed element is obsolete. Use CSS instead. The hspace attribute on the embed element is obsolete. Use CSS instead. The vspace attribute on the embed element is obsolete. Use CSS instead.

Notes

Remarks

The EMBED element must appear inside the BODY element of the document. Users need to have an application that can view the data installed on their computer. Tip:   In some cases, you may achieve better results by adding the file name extension of the add-on as a query parameter to the file name specified in the SRC attribute.

Permitted attributes - global attributes,& src ,& type, & height, & width, & Any other attribute that has no namespace.

Permitted parent elements Any element that can contain phrasing elements

ⓘglobal attributes Any attributes permitted globally. src = non-empty URL potentially surrounded by spaces The address of the content being embedded. ⓘ type = MIME type The MIME type of the plugin to instantiate. A string that identifies a valid MIME media type as defined in [RFC 2046]. ⓘ height = non-negative integer The height of the embedded content, in CSS pixels. ⓘ width = non-negative integer The width of the embedded content, in CSS pixels.

Related specifications

Specification Status Related Changes
HTML 5 specification W3C Working Draft

See also

Related articles

HTML










































  • EMBED









… further results

Multimedia









  • EMBED




Video




  • EMBED





Attribution

This article contains content originally from external sources.

Portions of this content come from the Microsoft Developer Network: [Windows Internet Explorer API reference Article]