embed

FilterElements

<embed> ... </embed>
(or
<embed />)

Embeds an object into the web page. Embedded objects are most often multimedia files that use plug-in technology for playback (for example, Flash movies, QuickTime movies, and the like). In addition to the attributes listed below, certain media types and their respective plug-ins may have proprietary attributes for controlling the playback of the file.

Notes

Although commonly supported by browsers, the embed element was not part of the HTML 4.01 or earlier specifications (in favor of the object element for embedded media), however, it has been added to the HTML5 Working Draft. Because it was supported but not documented, it has many browser- and media-specific attributes and its syntax is not clear. Many developers use both object and embed for a single media object for backward compatibility, even though it does not conform to the HTML 4.01/XHTML standard.

Start/End Tags

There is conflicting documentation regarding whether embed is a container or an empty element. Modern browsers seem to support both methods, but including the closing tag is the safest bet. In HTML5, it is specified as an empty element.

Specifications

  • HTML5

src=

Values: URL
Provides the location of the resource to be placed on the page.

type=

Values: media (MIME) type
Specifies the MIME type of the media in order to load the appropriate plug-in. The suffix of the file name given as the source may also be used to determine which plug-in to use.

width=

Values: number
Specifies the width of the object in number of pixels. Some media types require this attribute.
HTML5
<embed src="movies/vacation.mov" width="240" height="196" type="video/quicktime">
With end tag
<embed src="movies/vacation.mov" width="240" height="196" pluginspage="http://www.apple.com/quicktime/ download/">
  <noembed><img src="vacation.gif"> You do not seem to have the plugin.</noembed>
</embed>

Rendered Example

This element can not be rendered within this application.