Copyright © tutorialspoint.com

HTML <embed> tag



Advertisements

Function:

The HTML <embed> tag is used to embed multimedia in an HTML document.

You should use <noembed> tag along with this tag to handle browsers who do not support embed tag.

Difference between HTML and XHTML:

This tag is deprecated. You should use <object> tag.

Example:

<embed src="/html/yourfile.mid" width="100%" height="60" />

This will produce following result:

Online Practice:

To Become more comfortable - Do Online Practice

Attributes:

AttributeValueDescription
alignleft
right
center
Specifiies object alignment.
autostartnumberIndicates if the sound should start automatically. Netscape default is TRUE, Internet Explorer is FALSE.
controlsconsole
smallconsole
playbutton
pushbutton
stopbutton
volumelever
Indicates if the sound should start automatically. Netscape default is TRUE, Internet Explorer is FALSE.
endtimemm:ssIndicates spot (minutes and seconds) on track where play is to end. This attribute is available in Netscape only.
hrefURLConverts sound control file into URL. This attribute is available in IE only
loopnumberSpecifies if the sound should be played continuously (set loop to TRUE), a certain number of times (a positive value) or not at all (FALSE). This attribute is available in Netscape only.
playcountnumberSpecifies the number of times to play the sound. This attribute is available in IE only.
pluginspaceURLLocation of software necessary to install the plugin file. Only needed if the plugin is not a standard one.This attribute is available in Netscape only.
pluginurlURLLocation of software necessary to play the sound file. Only needed if the plugin is not a standard one. This attribute is available in Netscape only.
starttimemm:ssIndicates spot (minutes and seconds) on track where play is to start. This attribute is available in Netscape only.
targetURLConverts sound control file into URL. This attribute is available in IE only.
volumenumberControls volume of the sound. Can be from 0 (off) to 100 (full volume). This attribute is available in Netscape only.
hiddentrue or falseDefines if the object shows on the page. FALSE means no and TRUE means yes.
heightnumberHeight of the object in pixels or en.
namenameA name used to reference the object.
srcURLURL of the object to be embedded. This can be any recognized (by the client system) sound file (.midi, .wav and so on).
unitsXIndicates how to measure the units -> pixels or en. Default is in pixels
widthnumberWidth of the object in pixels or en.

Standard Attributes:

AttributeDescription
classDocument wide identifier
dirSpecifies the direction of the text
idDocument wide identifier
titleSpecifies a title to associate with the element.
styleHelps to include inline casecadubf style sheet.
langSets the language code.

Event Attributes:

AttributeDescription
onclickScript runs when a mouse click
ondblclickScript runs when a mouse double-click
onmousedownScript runs when mouse button is pressed
onmouseupScript runs when mouse button is released
onmouseoverScript runs when mouse pointer moves over an element
onmousemoveScript runs when mouse pointer moves
onmouseoutScript runs when mouse pointer moves out of an element
onkeypressScript runs when key is pressed and released
onkeydownScript runs when key is pressed
onkeyupScript runs when key is released

Copyright © tutorialspoint.com