You are here: Reference > HTML > tags > embed

embed element

Browser support:
Specifies an object to be embedded.
The embed tag is a non-standard element in HTML, but it is supported by all commonly used browsers. The embed tag can have additional attributes depending on the embedded application.
  • For example, if the embedded application is Adobe Flash Player, you can set the quality of display with the quality attribute. See Example 1 for details.
  • If the embedded application is Windows Media Player, the value of the autostart attribute indicates whether playback should start automatically upon loading. You can modify the visual appearance of the control with the showcontrols, showdisplay and showstatusbar attributes. See Example 3 for details.
If you want to see the HTML tags by categories, please visit this page.
This element cannot have a closing tag.
JavaScript page for this element: embed.

Possible members:

Attributes
Events
Styles
Pseudos
accessKey
Sets an access key to an element.
align
8
Sets the object's position with respect to the surrounding text.
class
Sets the style class or classes that belong to the element.
contentEditable
3
Sets whether the contents of the object are editable.
dir
Sets the text direction as related to the lang attribute.
DISABLED
Sets the state of an object for user interaction.
draggable
3.55
Sets whether an element is draggable.
height
Specifies the height of an element.
HIDDEN
Specifies a string value that indicates whether an embed object is visible.
HIDEFOCUS
Specifies whether a dotted rectangle (focus rectangle) is drawn around an object while it has focus.
id
Sets a unique identifier for the object.
lang
Specifies the language of the element.
language
Sets the scripting language for the current element. Use it only for the script element.
loop
Sets the type of repetition of the embedded media.
MAYSCRIPT
Indicates whether the Java applet is allowed to access the scripting objects of the web page.
name
Sets the name of an element.
pluginsPage
Sets the URL for installing a plug-in. If an embedded plug-in is not accessible on the client site, the URL can be used by the browser to download and install the required component.
pluginUrl
Sets the URL for installing a plug-in. If the embedded plug-in is not accessible on the client site, the URL can be used to download and install the required component by the browser.
Same as the pluginsPage attribute, use that for a standard cross-browser solution.
src
Sets the location of an associated file for an object.
style
Sets an inline style associated with an element.
tabIndex
Specifies the tabbing order for keyboard navigation using the TAB key.
title
Specifies a tooltip for an element.
type
Specifies the content type (MIME type) of the object or the linked object.
units
Specifies the measurement system used for the height and width attributes of an embed object.
unSelectable
Sets whether the selection process can start in an element's content.
width
Specifies the default width of the element.

Example HTML code 1:

This example illustrates the use of the embed element with Macromedia Flash Player:
<embed type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" 
    width="300px" height="200px" src="flash.swf" quality="high" />
Did you find this example helpful? yes no

Example HTML code 2:

This example illustrates the use of the embed element with Macromedia Flash Player.
It clearly focuses on cross-browser support only, and it isn’t standards-compliant, but there isn't any standards-compliant cross-browser way to embed a Flash application into a document with Flash Player detection.
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="300" height="120" 
        codebase="http://fpdownload.adobe.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0"
        standby="Loading flash movie">
    <param name="movie" value="flash.swf" />
    <!-- Optional params -->
    <param name="play" value="true" />
    <param name="loop" value="true" />
    <param name="quality" value="high" />
    <!-- END Optional -->
    <embed src="flash.swf" width="300" height="120" play="true" 
        loop="true" quality="high" 
        pluginspage="http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" /> 
</object>
Did you find this example helpful? yes no

Example HTML code 3:

This example illustrates the use of the embed element with Windows Media Player:
<embed type="application/x-mplayer2" src="testVideo.wmv" 
        width="320px" height="286px" autostart="true" showcontrols="1" 
        showstatusbar="0" showdisplay="0" />
Did you find this example helpful? yes no

Related pages:

External links:

User Contributed Comments

Post Content

Post Content