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).


Overview Table

DOM Interface HTMLEmbedElement

Accessibility

Authors should ensure that the information and user interface components must be presentable to users in ways they can perceive (WCAG 2.0 - Principle 1: Perceivable). This includes providing alternatives for time-based media Guideline 1.2.


HTML Attributes

  • src = URL potentially surrounded by spaces
    gives the address of the resource being embedded.
  • type = MIME type
    Specifies the type of the resource.
  • width = non-negative integer
    Give the width of the visual content of the element, in CSS pixels.
  • height = non-negative integer
    Give the height of the visual content of the element, in CSS pixels.

History

While only being formalized as of HTML5, the tag has been informally supported among some user-agents as far back as Netscape Navigator 2.0 [1]


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


Related specifications

Specification Status Related Changes
HTML 5.1 W3C Working Draft
HTML 5 W3C Recommendation

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]