Producing web pages
* HTML CSS DHTML XHTML A to Z of tags        Accessibility          Design

<embed>

<embed
align=absbottom|absmiddle|baseline|bottom|left|
center|right|top|middle|texttop

alt=text
border=n
class=type
dir=ltr|rtr
height=n
hidden=true|false
hspace=n
id=value
name=text
[optional parameter=&quot;value&quot;]
lang=language
palette=#rgb|#rgb
pluginspace=url
src=url
style=style
title=text
type=MIME type
vspace=n
width=n
</embed>

Indicates an embedded object such as a sound or video clip or a Netscape plug-in.

This tag is included for backward compatibility with earlier HTML pages; it is not part of the official HTML specification. You should use the <object> tag for inserting objects instead.

You must enter the end-tag.

Attributes

align=absbottom|absmiddle|baseline|bottom|left|center
|right|top|middle|texttop

Describes the alignment of an object to text. The default is left.

Value…

Description…

absbottom

Aligns the bottom of the object with the bottom of the current line

absmiddle

Aligns the middle of the current line with the middle of the picture

baseline

Aligns the bottom of the object with the baseline of the current line

bottom

Aligns to the bottom of surrounding text

left

Aligns to the left of surrounding text

center

Aligns to the centre of surrounding text

right

Aligns to the right of surrounding text

top

Aligns to the top of surrounding text

middle

Aligns to the middle of surrounding text

texttop

Aligns itself with the top of the tallest text in the line

alt=text

Specifies text that will be displayed in place of the embedded object if down load is turned off or if the browser cannot display the object.

border=n

Specifies the size of a border (in pixels) around the object.

class=type

Indicates the class to which the tag belongs. You can use the class attribute in a style sheet to create different styles that you want apply to a single HTML tag. For example, you might create three different styles for a heading <hn> tag. See Using the class attribute as a selector for more details.

dir=ltr|rtr

Specifies the direction of text. This can be left-to-right (ltr) or right-to-left (rtl). For example, English characters are presented left-to-right, Hebrew characters are presented right-to-left.

height=n

Specifies the height of the object on the page.

hidden=true|false

Specifies whether the plug-in is visible or not. For example you can hide the sound controls for background music.

Some plug-ins (like the LiveAudio plug-in) can control the embedded data type without being visible. The default value is false; this causes the browser to display plug-in controls.

hspace=n

Along with vspace, specifies margins for the picture. Similar to border, except the margins are not painted with colour when the picture is a link.

id=value

Specifies a unique name for the tag. No two tags can have the same id on a single page. The value must begin with a letter followed by any alphanumeric character, a hyphen, an underscore, a colon or a full stop. You use it to reference a unique style for a tag or to manipulate the tag with a script.

lang=language

Specifies which language the <embed> tag uses. You can enter any valid ISO standard language abbreviation, for example, “en” for English, “de” for German and so on. For example, <span lang="es">hola! como esta?</span>.

This attribute helps search engines understand different languages as different languages rather than just misspelled English. It may also help spelling and grammar checkers and allow speech synthesizers to use language-dependent pronunciation rules.

name=text

Indicates the name used by other objects or tags to refer to this object.

optional parameter="value"

Specifies any parameters that are specific to the object.

palette=#rgb|#rgb

Sets the colour palette to the foreground or background colour. The first colour is the foreground colour, the second colour is the background colour. For example, palette=#aa0000|#001100 sets the foreground colour to red and the background colour to green.

On screens with 256 colours, some embedded objects can cause what is known as 'palette flash'. This means the palette differences between the embedded object and the system cause the incorrect colours to be displayed. To avoid this, you can define the palettes of embedded objects as either foreground or background (the default). 'Foreground' causes the embedded object to use the foreground palette and 'background' forces it to use the background palette (the colours not reserved by the browser/system). Note that this attribute only works on the Windows.

pluginspace=url

If you don't have a plug-in installed to handle the defined object data type (determined from the src or type attribute value), you can guide the user to a different URL (the value of the pluginspace attribute) to provide instructions on how to install the necessary plug-in module. Generally, this should be the plug-in vendors installation instructions document.

src=url

Specifies the location of the object that you want to embed.

style=style

Specifies style information. See Style sheets for more information.

title=text

For information only. Some browsers display the title when you move the mouse over the tag (like a tool tip).

type=MIME type

You must enter either the src or type attribute when you put embedded objects into HTML pages to allow the browser to determine a suitable plug-in module to use to handle the data type. The type attribute accepts any valid MIME type.

vspace=n

Along with hspace, specifies margins for the picture. Similar to border, except the margins are not painted with colour when the picture is a hyperlink.

width=n

Specifies the width of the object on the page.