Copyright © tutorialspoint.com

# HTML <embed> tag

## 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:

Attribute | Value | Description
--- | --- | ---
align | left right center | Specifiies object alignment.
autostart | number | Indicates if the sound should start automatically. Netscape default is TRUE, Internet Explorer is FALSE.
controls | console smallconsole playbutton pushbutton stopbutton
volumelever
Indicates if the sound should start automatically. Netscape default is TRUE, Internet Explorer is FALSE.
endtime | mm:ss | Indicates spot (minutes and seconds) on track where play is to end. This attribute is available in Netscape only.
href | URL | Converts sound control file into URL. This attribute is available in IE only
loop | number | Specifies 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.
playcount | number | Specifies the number of times to play the sound. This attribute is available in IE only.
pluginspace | URL | Location 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.
pluginurl | URL | Location 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.
starttime | mm:ss | Indicates spot (minutes and seconds) on track where play is to start. This attribute is available in Netscape only.
target | URL | Converts sound control file into URL. This attribute is available in IE only.
volume | number | Controls volume of the sound. Can be from 0 (off) to 100 (full volume). This attribute is available in Netscape only.
hidden | true or false | Defines if the object shows on the page. FALSE means no and TRUE means yes.
height | number | Height of the object in pixels or en.
name | name | A name used to reference the object.
src | URL | URL of the object to be embedded. This can be any recognized (by the client system) sound file (.midi, .wav and so on).
units | X | Indicates how to measure the units -> pixels or en. Default is in pixels
width | number | Width of the object in pixels or en.

## Standard Attributes:

Attribute | Description
--- | ---
class | Document wide identifier
dir | Specifies the direction of the text
id | Document wide identifier
title | Specifies a title to associate with the element.
style | Helps to include inline casecadubf style sheet.
lang | Sets the language code.

## Event Attributes:

Attribute | Description
--- | ---
onclick | Script runs when a mouse click
ondblclick | Script runs when a mouse double-click
onmousedown | Script runs when mouse button is pressed
onmouseup | Script runs when mouse button is released
onmouseover | Script runs when mouse pointer moves over an element
onmousemove | Script runs when mouse pointer moves
onmouseout | Script runs when mouse pointer moves out of an element
onkeypress | Script runs when key is pressed and released
onkeydown | Script runs when key is pressed
onkeyup | Script runs when key is released

Copyright © tutorialspoint.com