Name

embed

Synopsis

<embed>...</embed> or <embed />

Nonstandard. Embeds an object into the web page. Embedded objects are most often multimedia files that require special plug-ins to display (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. The closing tag is not always required, but is recommended.

The W3C recommends the object element for embedding media objects, but embed is still in common use for backward compatibility. If you want the browser to prompt for a missing plug-in, you might need to break conformance and use embed. Many developers use both object and embed for a single media object.

Attributes

align="left|right|top|bottom"

NN 4.0+ and MSIE 4.0+ only. Controls the alignment of the media object relative to the surrounding text. The default is bottom. While top and bottom are vertical alignments, left and right position the object on the left or right margin and allow text to wrap around it.

height=" number "

Specifies the height of the object in number of pixels. Some media types require this attribute.

hidden="yes|no"

Hides the media file or player from view when set to yes. The default is no.

name=" text "

Specifies a name for the embedded object. This is particularly useful for referencing the object from a script.

palette="foreground|background"

NN 4.0+ and MSIE 4.0+ only. This attribute applies ...

Get Web Design in a Nutshell, 3rd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.