embed

< html‎ | elements
Jump to: navigation, search

embed



Summary

The embed element (<embed>) defines a container for an external application or interactive content (a plug-in). The <embed> element is new in HTML5.


Overview Table

DOM Interface HTMLEmbedElement

Examples

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

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

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. For more information, see Build Flexible, Lightweight XML-Based Images for ASP.NET Using Scalable Vector Graphics.

Performance Note:   Windows Internet Explorer relies on the MIME type of the resource specified in the SRC attribute to ultimately determine which application to use to display the embedded document. If the TYPE attribute has not been specified, a large portion (if not all) of the resource will be downloaded from the server twice; once to determine the MIME type, and again to retrieve the complete item for playback, display, or both. Specify the TYPE attribute to block this duplicate server request. Because the EMBED element loads external software programs (also called add-ons or plug-ins), the configuration of the user's software envionment can affect the way Internet Explorer interprets the EMBED element. For example, if the SRC attribute value specifies a file by using a file name extension different from the one typically associated with the add-on loaded by the EMBED element, Internet Explorer uses the value of the TYPE attribute to determine the add-on to load. As a result, Web developers should specify values for as many attributes as possible, including SRC, TYPE, and PLUGINSPAGE.

As of HTML 4.01, the EMBED element is deprecated in favor of the OBJECT element.

Standards information


HTML information

{

Compatibility

Desktop

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support ? ? ? ? ?

Mobile

Feature Android BlackBerry Chrome for mobile Firefox Mobile (Gecko) IE Mobile Opera Mobile Opera Mini Safari Mobile
Basic support ? ? ? ? ? ? ? ?

This article contains content originally from external sources.

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