<embed> Syntax
Syntax Diagram for
<embed>
Opening Tag |
Content |
Closing Tag |
Open |
Parameter |
= |
Value |
Close |
<embed |
src |
= |
url |
> |
content |
</embed> |
type |
= |
mimetype |
pluginspage |
= |
url |
pluginurl |
= |
url |
align |
= |
left |
right |
top |
bottom |
border |
= |
pixels |
hidden |
= |
true |
false |
hspace |
= |
pixels |
vspace |
controls |
= |
name |
console |
= |
name |
width |
= |
units |
height |
units |
= |
pixels |
en |
autostart |
= |
true |
false |
name |
= |
plugin name |
palette |
= |
foreground |
background |
Syntax Diagram for <noembed>
Opening Tag |
Content |
Closing Tag |
<noembed> |
text |
</noembed> |
<embed> Description
The <embed> tag embeds a generic object into the web page; the
functionality of the object varies.
- src
- The URL of the object to be embedded. The MIME type of the file, which
should correspond to the filename suffix, determines which plugin is
loaded to handle the object being embedded. If you do not specify the
src attribute, you must specify the type attribute.
- type
- The MIME (Multipurpose Internet Multimedia Extensions) type of the object
to be embedded. The MIME type of the file determines which plugin is
loaded to handle the object being embedded. If you do not specify the
type attribute, you must specify the src attribute.
- pluginspage
- The URL of a web page that has the instructions for installing the plugin
required to handle the object specified in the <embed> tag.
This URL is only accessed if the plugin is not already installed.
- pluginurl
- The URL of a JAR (Java ARchive) file. The default plugin invokes the JAR
Installation Manager (JIM) with this JAR file URL, rather than loading the
URL into a window. pluginurl takes precedence over
pluginspage.
- align
- Specifies the alignment for the visible representation of the embedded
plugin. Default is "left".
- border
- Specifies the thickness of the border surrounding the plugin. Expressed
in pixels (default is 1).
- frameborder
- Specifies that the plugin has no border (i.e., the border thickness is
zero).
- units
- Specifies the unit of measurement to be used for the height and
width of the visible representation of the plugin. The value can
be either "pixels" (the default) or "en" (1 en =
current_point_size/2)
- hidden
- Specifies whether or not the visible representation of the plugin is
visible on the page. A value of true for hidden
overrides any height and width, setting the both to
zero. The default is false.
- hspace, vspace
- Specifies the horizontal (or vertical) space between the left and right
(or top and bottom) edges of the visible representation of the plugin and
any surrounding content. Expressed in pixels.
- name
- Specifies the name of the plugin in the context of the browser page. That
is, this attribute defines an identifier that can, for example, be used by
a JavaScript program. It does not modify the file name of the
plugin.
- palette
- This attribute is relevant only to Wintel computers. If set to
foreground, the plugin uses the foreground palette; if
background, the plugin uses the background palette. Default is
background.
- console
- An identifier whose name allows single objects to be referred to (if
necessary) and multiple objects to be associated together into a group (see
example below).
- controls
- A name whose value depends on the kind of object being embedded.
- width, height
- The desired width and height of the object being embedded.
- autostart
- A boolean value that specifies whether or not the object should activate
immediately (as opposed to waiting for the user to activate it). Note
that it is not a good idea to specify "autostart=false" and then
not make any controls available to the user; the object could never
be activated.
<embed> Examples
This markup, which compares a standalone streaming-audio link to an embedded
one (note that you'll need the RealAudio
application and plugin, and your browser configured to use them, in order for
these examples to work), shows one usage of the <embed> tag:
Standalone RealAudio link:
Click Me
Embedded RealAudio link:
Both the Buckyballs.ram and the Buckyballs.rpm file are
RealAudio metafiles; the .ram suffix stands for RealAudio Metafile,
and the .rpm suffix stands for RealAudio Plugin Metafile. Both files
are one-line text files whose contents specify the RealAudio file to play; the
different suffixes merely serve to tell the browser whether to use the
standalone player or the embedded player. The contents of the metafiles are
as follows:
http://www.arnspub.com/QuickRef/Buckyballs.ra
The Buckyballs.ra file is the RealAudio file to be played. Note that
the "NoAudio.rpm" file is a "null" file; its name can be anything you
want, as long as the contents consist solely of a carriage return
(ASCII 15). The second and third <embed> tags are
associated with the same RealAudio file as the first one (because of the value
of the Console attribute), but there's no need to download a metafile
for each individual control; hence, the null RealAudio file. The above markup
causes the following to be displayed:
Standalone RealAudio link:
Click Me
Embedded RealAudio link:
Last Modified: