Contents
HTML $B$N%^%k%A%a%G%#%"5!G=$r;H$C$F!"2hA|$d%"%W%l%C%H!J<+F0E*$KFI$_9~$^$lMxMQ $BNc$($P!"(JPNG$B2hA|$rJ8=q$KF~$l$k$K$O!"
For example, to include a PNG image in a document, authors
may write:
HTML $B$N0JA0$N%P!<%8%g%s$G$O!"(J $B!J(JIMG$B$K$h$C$F!K2hA|$H!J(JAPPLET$B$K$h$C$F!K%"%W%l%C%H$rF~$l$i$l$k$h$&$K$J$C$F$$$^$7$?!#(J
$B$3$l$i$NMWAG$K$O!"$$$/$D$+$N8B3&$,$"$j$^$9!'(J $B$3$l$i$NLdBj$KBP$7$F!"(J HTML 4.0 $B$O!"0lHLE*$J%*%V%8%'%/%HJq4^$KB?L\E*$N2r7h0F$rDs6!$9$k(JOBJECT$BMWAG$r>R2p$7$^$9!#(J
OBJECT$BMWAG$K$h$j!"%f!<%6%(!<%8%'%s%H$K$h$C$FDs<($5$l$k%*%V%8%'%/%H$N$?$a$KI,MW$J$b$N$9$Y$F!"$D$^$j%=!<%9%3!<%I$H=i4|CM$H%i%s%?%$%`%G!<%?$r;XDj$9$k$3$H$,$G$-$^$9!#(J
$B$3$N;EMM=q$GMQ8l(J"object"$B$O!"(JHTML$BJ8=q$KCV$3$&$H$9$k/5$b$N/6$r;X$7$F;H$o$l$^$9$,!"$3$l$rJL$NMQ8l$G8@$($P!"9=@.MWAG!&%"%W%l%C%H!&%W%i%0%$%s!&%a%G%#%"%O%s%I%i$J$I$H$J$j$^$9!#(J $B=>$C$F?7$7$$(JOBJECT$BMWAG$O!"8=B8$9$kMWAG$K$h$C$F $BJq4^$N3F!9$N%?%$%W$K$O!"FC $B2hA|$rF~$l$k$N$K$O(J$B!"(JOBJECT$B$H(JIMG$B$$$:$l$NMWAG$r;H$C$F$b$+$^$$$^$;$s!#(J APPLET$BMWAG$O(J$BGQ;_$5$l$?(J$B$N$G!"(J$B%"%W%l%C%H$rF~$l$k$K$O(JOBJECT$BMWAG$r;H$&$Y$-$G$9!#(J HTML $BJ8=q$r=E$M9g$;$k$N$K$O!"?7$7$$(J IFRAME $BMWAG$+(J OBJECT $BMWAG$N$I$A$i$r;H$C$F$b$+$^$$$^$;$s!#(J
$B$$$:$l$K$;$h!"=E$M$i$l$?J8=q$O!" $B1GA|$=$NB>$N%*%V%8%'%/%H$K$O!"I8=`E*$J%j%s%/$N;EJ}$@$1$G$J$/!"1GA|%^%C%W$K$h$C$F$bO"F0$9$k%O%$%Q!<%j%s%/$rD%$k$3$H$,$G$-$^$9!#(J
$B1GA|%^%C%W$O%*%V%8%'%/%H$NF0:nNN0h$r4v2?3XE*$K;XDj$7$F!"3F!9$NNN0h$K%j%s%/$r3d$jEv$F$k$b$N$G$9!#(J
$B$3$l$i$N%j%s%/$OF0:n$9$k$H$-!"J8=q$r8!:w$5$;$?$j!"%5!<%P$G%W%m%0%i%`$rAv$i$;$?$j$9$k$h$&$K$G$-$^$9!#(J $B
In the following sections, we discuss the various mechanisms
available to authors for multimedia inclusions and creating image maps
for those inclusions.
Start tag: required, End tag: forbidden
Attribute definitions
Attributes defined elsewhere
The IMG element embeds an image in the
current document at the location of the element's definition. The
IMG element has no content; it is usually
replaced inline by the image designated by the src attribute, the exception being for
left or right-aligned images that are "floated" out of line.
In an earlier example, we defined a link to a family photo. Here, we
insert the photo directly into the current document:
This inclusion may also be achieved with the OBJECT element as follows:
alt $BB0@-$O!"2hA|$,I=<($G$-$J$$$H$-$KM?$($i$l$kBe$o$j$NJ8>O$r;XDj$7$^$9!#!J$I$N$h$&$KBe$o$j$NJ8>O$r;XDj$9$k$+$K$D$$$F$O!"2<$N@bL@$r8+$F$/$@$5$$!K(J
$BFCDj$N1GA|%?%$%W$r07$&$3$H$,$G$-$J$$$+!"0?$$$O1GA|$rI=<($7$J$$$h$&$K@_Dj$5$l$F$$$k$?$a$K1GA|$r07$&$3$H$,$G$-$J$$$H$-$O!"%f!<%6%(!<%8%'%s%H$O!"Be$o$j$NJ8>O$r=<$F$k$h$&$K$7$J$1$l$P$J$j$^$;$s!#(J
The following example shows how the longdesc
attribute can be used to link to a richer description:
The alt attribute provides a short
description of the image. This should be sufficient to allow users to
decide whether they want to follow the link given by the longdesc attribute to the longer
description, here "sitemap.html".
Please consult the section on the visual
presentation of objects, images, and applets for information about
image size, alignment, and borders.
Start tag: required, End tag: required
Attribute definitions
Attributes defined elsewhere
Most user agents have built-in mechanisms for rendering
common data types such as text, GIF images, colors, fonts, and a
handful of graphic elements. To render data types they don't support
natively, user agents generally run external applications. The OBJECT element allows authors to control whether
data should be rendered externally or by some program, specified by
the author, that renders the data within the user agent.
In the most general case, an author may need to specify
three types of information:
The OBJECT element allows authors to
specify all three types of data, but authors may not have to specify
all three at once. For example, some objects may not require data
(e.g., a self-contained applet that performs a small
animation). Others may not require run-time initialization. Still
others may not require additional implementation information, i.e.,
the user agent itself may already know how to render that type of data
(e.g., GIF images).
Authors specify an object's implementation and the location of
the data to be rendered via the OBJECT
element. To specify run-time values, however, authors use the PARAM element, which is discussed in the section
on object initialization.
The OBJECT element may also appear in the
content of the HEAD element. Since
user agents generally do not render elements in the HEAD, authors should ensure that any OBJECT elements in the HEAD do not specify content that may be
rendered. Please consult the section on sharing frame
data for an example of including the OBJECT element in the HEAD element.
Please consult the section on form controls for
information about OBJECT elements in forms.
A user agent must interpret an OBJECT
element according to the following precedence rules:
Authors should not include content in OBJECT elements that appear in the HEAD element.
In the following example, we insert an analog clock applet in a
document via the OBJECT element. The
applet, written in the Python language, requires no additional data or
run-time values. The classid attribute
specifies the location of the applet:
Note that the clock will be rendered as soon as the user agent
interprets this OBJECT declaration. It is
possible to delay rendering of an object by first
declaring the object (described below).
Authors should complete this declaration by including alternate
text as the contents of OBJECT in case the
user agent cannot render the clock.
One significant consequence of the OBJECT element's design is that it offers a
mechanism for specifying alternate object renderings; each embedded
OBJECT declaration may specify alternate
content types. If a user agent cannot render the outermost OBJECT, it tries to render the contents, which
may be another OBJECT element, etc.
In the following example, we embed several OBJECT declarations to illustrate how alternate
renderings work. A user agent will attempt to render the first OBJECT element it can, in the following order:
(1) an Earth applet written in the Python language, (2) an MPEG
animation of the Earth, (3) a GIF image of the Earth, (4) alternate text.
The outermost declaration specifies an applet that requires no data
or initial values. The second declaration specifies an MPEG animation
and, since it does not define the location of an implementation to
handle MPEG, relies on the user agent to handle the animation. We
also set the type attribute so that a user
agent that knows it cannot render MPEG will not bother to retrieve
"TheEarth.mpeg" from the network. The third declaration specifies the
location of a GIF file and furnishes alternate text in case all other
mechanisms fail.
Inline vs. external data. Data to be rendered may
be supplied in two ways: inline and from an external resource. While
the former method will generally lead to faster rendering, it is not
convenient when rendering large quantities of data.
Here's an example that illustrates how inline data
may be fed to an OBJECT:
Please consult the section on the visual
presentation of objects, images, and applets for information about
object size, alignment, and borders.
Start tag: required, End tag: forbidden
Attribute definitions
Attributes defined elsewhere
PARAM elements specify a set of values
that may be required by an object at run-time. Any number of PARAM elements may appear in the content of an
OBJECT or APPLETelement, in any order, but must be placed at
the start of the content of the enclosing OBJECT or APPLET
element.
The syntax of names and values is assumed to be understood by the
object's implementation. This document does not specify how user agents
should retrieve name/value pairs nor how they should interpret parameter
names that appear twice.
We return to the clock example to illustrate the use of PARAM: suppose that the applet is able to handle
two run-time parameters that define its initial height and width. We
can set the initial dimensions to 40x40 pixels with two PARAM elements.
In the following example, run-time data for the object's
"Init_values" parameter is specified as an external resource (a GIF file).
The value of the valuetype attribute
is thus set to "ref" and the value is a
URI designating the resource.
Note that we have also set the standby
attribute so that the user agent may display a message while the rendering
mechanism loads.
When an OBJECT element is rendered, user
agents must search the content for only those PARAM elements that are direct children and
"feed" them to the OBJECT.
Thus, in the following example, if "obj1" is rendered, "param1"
applies to "obj1" (and not "obj2"). If "obj1" is not rendered and
"obj2" is, "param1" is ignored, and "param2" applies to "obj2". If
neither OBJECT is rendered, neither PARAM applies.
The location of an object's implementation is given by a URI. As we
discussed in the introduction
to URIs, the first segment of an absolute URI specifies the naming
scheme used to transfer the data designated by the URI. For HTML
documents, this scheme is frequently "http". Some applets might employ
other naming schemes. For instance, when specifying a Java applet,
authors may use URIs that begin with "java" and for ActiveX applets,
authors may use "clsid".
In the following example, we insert a Java applet into an HTML document.
By setting the codetype attribute, a
user agent can decide whether to retrieve the Java application based
on its ability to do so.
Some rendering schemes require additional information to identify
their implementation and must be told where to find that
information. Authors may give path information to the object's implementation
via the codebase attribute.
The following example specifies (with the classid attribute) an ActiveX object
via a URI that begins with the naming scheme "clsid". The data attribute locates the data to render
(another clock).
To declare an object so that it is not executed when
read by the user agent, set the boolean declare attribute in the OBJECT element. At the same time, authors must
identify the declaration by setting the id
attribute in the OBJECT element to a
unique value. Later instantiations of the object will refer to this
identifier.
A declared OBJECT must appear in a
document before the first instance of that OBJECT.
An object defined with the declare
attribute is instantiated every time an element that refers to that
object requires it to be rendered (e.g., a link that refers to it is
activated, an object that refers to it is activated, etc.).
In the following example, we declare an OBJECT and
cause it so be instantiated by referring to it from a link. Thus, the
object can be activated by clicking on some highlighted text, for
example.
The following example illustrates how to specify run-time values that are other
objects. In this example, we send text (a poem, in fact) to a
hypothetical mechanism for viewing poems. The object
recognizes a run-time parameter named "font" (say, for rendering the
poem text in a certain font). The value for this parameter is itself an
object that inserts (but does not render) the font object. The
relationship between the font object and the poem viewer object is
achieved by (1) assigning the id
"tribune" to the font object declaration and (2)
referring to it from the PARAM element of
the poem viewer object (with valuetype and
value).
User agents that don't support the declare attribute must render the contents of the
OBJECT declaration.
See the Transitional DTD for the
formal definition.
Attribute definitions When the applet is "deserialized" the start() method
is invoked but not the init() method. Attributes valid
when the original object was serialized are not
restored. Any attributes passed to this APPLET instance will be available to the applet.
Authors should use this feature with extreme caution. An applet
should be stopped before it is serialized. Either code or object must be present. If both code and object are
given, it is an error if they provide different class names.
Attributes defined elsewhere
This element, supported by all Java-enabled browsers, allows
designers to embed a Java applet in an HTML document. It has been deprecated in favor of the OBJECT element.
The content of the APPLET acts as
alternate information for user agents that don't support this element or
are currently configured not to support applets. User agents
must ignore the content otherwise.
DEPRECATED EXAMPLE: This example may be rewritten as follows with OBJECT as follows:
Initial values may be supplied to the applet via the PARAM element.
DEPRECATED EXAMPLE: may be rewritten as follows with OBJECT:
An embedded document is entirely independent of the document in
which it is embedded. For instance, relative URIs within the embedded
document resolve
according to the base URI of the embedded document, not that of the
main document. An embedded document is only rendered within another
document (e.g., in a subwindow); it remains otherwise independent.
For instance, the following line embeds the contents of
embed_me.html at the location where the OBJECT definition occurs.
Recall that the contents of OBJECT must
only be rendered if the file specified by the data attribute cannot be loaded.
The behavior of a user agent in cases where a file includes itself
is not defined.
An image map is created by associating an object with
a specification of sensitive geometric areas on the object.
There are two types of image maps:
Client-side image maps are preferred over server-side image
maps for at least two reasons: they are accessible to people browsing
with non-graphical user agents and they offer immediate feedback as to
whether or not the pointer is over an active region. Start tag: required, End tag: required Start tag: required, End tag: forbidden
MAP attribute definitions
AREA attribute definitions Coordinates are relative to the top, left corner of the object. All
values are lengths. All values
are separated by commas.
Attribute to associate an image map with an element
Attributes defined elsewhere
The MAP element specifies a client-side
image map that may be associated with one or more elements (IMG, OBJECT, or INPUT). An image map is associated with an
element via the element's usemap attribute.
The presence of the usemap attribute for
an OBJECT implies that the object being
included is an image. Furthermore, when the
OBJECT element has an associated
client-side image map, user agents may implement user interaction with
the OBJECT solely in terms of the
client-side image map. This allows user agents (such as an audio
browser or robot) to interact with the OBJECT without having to process it; the user
agent may even elect not to retrieve (or process) the object. When an
OBJECT has an associated image map, authors
should not expect that the object will be retrieved or processed by
every user agent.
Each MAP element may contain either one of
the following:
If two or more defined regions overlap, the region-defining
element that appears earliest in the document takes precedence (i.e.,
responds to user input).
User agents and authors should offer textual
alternates to graphical image maps for cases when graphics are
not available or the user cannot access them. For example, user agents
may use alt text to create textual links in
place of a graphical image map. Such links may be activated in a
variety of ways (keyboard, voice activation, etc.).
Note.
MAP is not backwards compatible with HTML
2.0 user agents.
In the following example, we create a client-side image map for the
OBJECT element. We do not want
to render the image map's contents when the OBJECT
is rendered, so we "hide" the MAP element
within the OBJECT element's content.
Consequently, the MAP element's contents will only be rendered if
the OBJECT cannot be rendered.
We may want to render the image map's contents even when a user
agent can render the OBJECT. For instance,
we may want to associate an image map with an OBJECT element and include a text navigation bar
at the bottom of the page. To do so, we define the MAP element outside the OBJECT:
In the following example, we create a similar
image map, this time using the AREA
element. Note the use of alt text:
Here is a similar version using the IMG
element instead of OBJECT (with the same
MAP declaration):
The following example illustrates how image maps
may be shared.
Nested OBJECT elements are useful for
providing fallbacks in case a user agent doesn't support certain
formats. For example: If the user agent doesn't support the PNG format, it tries to
render the GIF image. If it doesn't support GIF (e.g., it's a
speech-based user agent), it defaults to the text description provided
as the content of the inner OBJECT element.
When OBJECT elements are nested this way,
authors may share image maps among them:
The following example illustrates how anchors may be specified to
create inactive zones within an image map. The first anchor specifies
a small circular region with no associated link. The second anchor
specifies a larger circular region with the same center
coordinates. Combined, the two form a ring whose center is inactive
and whose rim is active. The order of the anchor definitions is
important, since the smaller circle must override the larger circle.
Similarly, the nohref attribute for
the AREA element declares that geometric
region has no associated link.
Server-side image maps may be interesting in cases where the image map
is too complicated for a client-side image map.
It is only possible to define a server-side image map for the IMG and INPUT
elements. In the case of IMG, the IMG must be enclosed by an A element. In the case of INPUT, the INPUT must
be of type "image". In both cases, the boolean attribute ismap [CI] on the element must be
set.
When the user activates the link by clicking on the image, the screen
coordinates are sent directly to the server where the document
resides. Screen coordinates are expressed as screen pixel values relative
to the image. For normative information about the definition of a pixel and
how to scale it, please consult [CSS1].
In the following example, the active region defines a server-side
link. Thus, a click anywhere on the image will cause the click's
coordinates to be sent to the server.
The location
clicked is passed to the server as follows. The user agent
derives a new URI from the URI specified by the href attribute of the A element, by appending `?' followed by the x and
y coordinates, separated by a comma. The link is then followed using
the new URI. For instance, in the given example, if the user clicks at
the location x=10, y=27 then the derived URI is
"http://www.acme.com/cgi-bin/competition?10,27".
User agents that do not offer the user a means to select specific
coordinates (e.g., non-graphical user agents that rely on keyboard
input, speech-based user agents, etc.) should send the coordinates
"0,0" to the server when the link is activated.
Attribute definitions When specified, the width and height attributes tell user agents to
override the natural image or object size in favor of these
values.
When the object is an image, it is scaled. User agents should do
their best to scale an object or image to match the width and height
specified by the author. Note that lengths expressed as percentages
are based on the horizontal or vertical space currently available, not
on the natural size of the image, object, or applet.
The height and width attributes give user agents an idea of
the size of an image or object so that they may reserve space for it
and continue rendering the document while waiting for the image data.
The vspace and
hspace attributes
specify the amount of white space to be inserted to the left and right
(hspace) and above and below (vspace) an IMG, APPLET, OBJECT. The default value for these attributes is
not specified, but is generally a small, non-zero length. Both
attributes take values of type length.
An image or object may be surrounded by a border (e.g., when a
border is specified by the user or when the image is the content of an
A element).
Attribute definitions The align
attribute specifies the position of an IMG,
OBJECT, or APPLET with respect to its context.
The following values for align
concern the object's position with respect to surrounding text:
Two other values, left and right, cause
the image to float to the current left or right margin. They are
discussed in the section on floating objects.
Differing interpretations of align.
User agents vary in their interpretation of the align attribute. Some only take into account what
has occurred on the text line prior to the element, some take into
account the text on both sides of the element.
Attribute definitions $BJ8>O0J30$NMWAG!J(J IMG $B$H(J AREA $B$H(J APPLET $B$H(J INPUT $B!K$G$O!"$=$NMWAG$,@5>o$KI=<($5$l$J$$$H$-$K;H$o$l$kBe$o$j$NJ8>O$r;XDj$9$kI,MW$,$"$j$^$9!#(J
$B;XDj$5$l$?Be$o$j$NJ8>O$O!"1GA|$rI=<($G$-$k4D6-$r;}$?$J$$?M$d!"=q<0$r07$o$J$$=q8+4o$r;H$C$F$$$k?M!"(J $B;k3P>c32$r;}$D?M(J, $B2;@<9g@.AuCV$r;H$&?M(J , $B1GA|I=<($G$-$kMxMQ alt $BB0@-$O!"(J IMG $B$H(J AREA $BMWAG$G$O;XDj$5$l$J$1$l$P$J$j$^$;$s!#(J
INPUT $B$H(J APPLET $BMWAG$G$OG$0U$G$9!#(J $BBe$o$j$NJ8>O$OHs>o$KLrN)$D$+$b$7$l$J$$$@$1$K!"Cm0U$7$F07$o$l$J$1$l$P$J$j$^$;$s!#(J
$BCx $BBe$o$j$NJ8>O$,>J$+$l$F$$$k>l9g$r$I$N$h$&$K07$&$+$K$D$$$F$O!"BeBXJ8@8@.$N9`$r;29M$K$7$F$/$@$5$$!#(J
Note.
For more information about designing accessible HTML documents, please
consult [WAIGUIDE].
HTML's multimedia features allow authors to include images, applets
(programs that are automatically downloaded and run on the user's
machine), video clips, and other HTML documents in their pages.
<BODY>
<P>Here's a closeup of the Grand Canyon:
<OBJECT data="canyon.png" type="image/png">
This is a <EM>closeup</EM> of the Grand Canyon.
</OBJECT>
</BODY>
Previous versions of HTML allowed authors to include images (via
IMG) and applets (via APPLET). These elements have several limitations:
They fail to solve the more general problem of how to include
new and future media types.
The APPLET element only works with
Java-based applets. This element is deprecated in favor of OBJECT.
They pose accessibility problems.
To address these issues, HTML 4.0 introduces the OBJECT element, which offers an all-purpose
solution to generic object inclusion. The OBJECT element allows HTML authors to specify
everything required by an object for its presentation by a user agent:
source code, initial values, and run-time data. In this
specification, the term "object" is used to describe the things that
people want to place in HTML documents; other commonly used terms for
these things are: applets, plug-ins, media handlers, etc.
Type of inclusion
Specific element
Generic element Image
IMG
OBJECT
Applet
APPLET (Deprecated.)
OBJECT
Another HTML document
IFRAME
OBJECT
To include
images, authors may use the OBJECT
element or the IMG element.
To include applets, authors should use the OBJECT element as the APPLET element is deprecated.
Images and other included objects may have hyperlinks associated
with them, both through the standard linking
mechanisms, but also via image
maps. An image map specifies active geometric regions of an
included object and assigns a link to each region. When activated,
these links may cause a document to be retrieved, may run a program on
the server, etc.
13.2 Including an image: the IMG element
<!-- To avoid problems with text-only UAs as well as
to make image content understandable and navigable
to users of non-visual UAs, you need to provide
a description with ALT, and avoid server-side image maps -->
<!ELEMENT IMG - O EMPTY -- Embedded image -->
<!ATTLIST IMG
%attrs; -- %coreattrs, %i18n, %events --
src %URI; #REQUIRED -- URI of image to embed --
alt %Text; #REQUIRED -- short description --
longdesc %URI; #IMPLIED -- link to long description
(complements alt) --
height %Length; #IMPLIED -- override height --
width %Length; #IMPLIED -- override width --
usemap %URI; #IMPLIED -- use client-side image map --
ismap (ismap) #IMPLIED -- use server-side image map --
>
<BODY>
<P>I just returned from vacation! Here's a photo of my family at the lake:
<IMG src="http://www.somecompany.com/People/Ian/vacation/family.png"
alt="A photo of my family at the lake.">
</BODY>
<BODY>
<P>I just returned from vacation! Here's a photo of my family at the lake:
<OBJECT data="http://www.somecompany.com/People/Ian/vacation/family.png"
type="image/png">
A photo of my family at the lake.
</OBJECT>
</BODY>
The alt attribute specifies
alternate text that is rendered when the image cannot be displayed
(see below for information on how to specify
alternate text ). User agents must render alternate next when they
cannot support images, they cannot support a certain image type or
when they are configured not to display images.
<BODY>
<P>
<IMG src="sitemap.gif"
alt="HP Labs Site Map"
longdesc="sitemap.html">
</BODY>
13.3 Generic inclusion: the OBJECT element
<!ELEMENT OBJECT - - (PARAM | %flow;)*
-- generic embedded object -->
<!ATTLIST OBJECT
%attrs; -- %coreattrs, %i18n, %events --
declare (declare) #IMPLIED -- declare but don't instantiate flag --
classid %URI; #IMPLIED -- identifies an implementation --
codebase %URI; #IMPLIED -- base URI for classid, data, archive--
data %URI; #IMPLIED -- reference to object's data --
type %ContentType; #IMPLIED -- content type for data --
codetype %ContentType; #IMPLIED -- content type for code --
archive %URI; #IMPLIED -- space separated archive list --
standby %Text; #IMPLIED -- message to show while loading --
height %Length; #IMPLIED -- override height --
width %Length; #IMPLIED -- override width --
usemap %URI; #IMPLIED -- use client-side image map --
name CDATA #IMPLIED -- submit as part of form --
tabindex NUMBER #IMPLIED -- position in tabbing order --
>
13.3.1
Rules for rendering objects
<P><OBJECT classid="http://www.miamachina.it/analogclock.py">
</OBJECT>
<P><OBJECT classid="http://www.miamachina.it/analogclock.py">
An animated clock.
</OBJECT>
<P> <!-- First, try the Python applet -->
<OBJECT title="The Earth as seen from space"
classid="http://www.observer.mars/TheEarth.py">
<!-- Else, try the MPEG video -->
<OBJECT data="TheEarth.mpeg" type="application/mpeg">
<!-- Else, try the GIF image -->
<OBJECT data="TheEarth.gif" type="image/gif">
<!-- Else render the text -->
The <STRONG>Earth</STRONG> as seen from space.
</OBJECT>
</OBJECT>
</OBJECT>
<P>
<OBJECT id="clock1"
classid="clsid:663C8FEF-1EF9-11CF-A3DB-080036F12502"
data="data:application/x-oleobject;base64, ...base64 data...">
A clock.
</OBJECT>
13.3.2
Object initialization: the PARAM element
<!ELEMENT PARAM - O EMPTY -- named property value -->
<!ATTLIST PARAM
id ID #IMPLIED -- document-wide unique id --
name CDATA #REQUIRED -- property name --
value CDATA #IMPLIED -- property value --
valuetype (DATA|REF|OBJECT) DATA -- How to interpret value --
type %ContentType; #IMPLIED -- content type for value
when valuetype=ref --
>
<P><OBJECT classid="http://www.miamachina.it/analogclock.py">
<PARAM name="height" value="40" valuetype="data">
<PARAM name="width" value="40" valuetype="data">
This user agent cannot render Python applications.
</OBJECT>
<P><OBJECT classid="http://www.gifstuff.com/gifappli"
standby="Loading Elvis...">
<PARAM name="Init_values"
value="./images/elvis.gif">
valuetype="ref">
</OBJECT>
<P>
<OBJECT id="obj1">
<PARAM name="param1">
<OBJECT id="obj2">
<PARAM name="param2">
</OBJECT>
</OBJECT>
13.3.3
Global naming schemes for objects
<P><OBJECT classid="java:program.start">
</OBJECT>
<OBJECT codetype="application/java-archive"
classid="java:program.start">
</OBJECT>
<OBJECT codetype="application/java-archive"
classid="java:program.start">
codebase="http://foooo.bar.com/java/myimplementation/"
</OBJECT>
<P><OBJECT classid="clsid:663C8FEF-1EF9-11CF-A3DB-080036F12502"
data="http://www.acme.com/ole/clock.stm">
This application is not supported.
</OBJECT>
13.3.4
Object declarations and
instantiations
The preceding examples have only illustrated isolated object
definitions. When a document is to contain more than one instance of
the same object, it is possible to separate the declaration of the
object from its instantiations. Doing so has several advantages:
<P><OBJECT declare
id="earth.declaration"
data="TheEarth.mpeg"
type="application/mpeg">
The <STRONG>Earth</STRONG> as seen from space.
</OBJECT>
...later in the document...
<P>A neat <A href="#earth.declaration"> animation of The Earth!</A>
<P><OBJECT declare
id="tribune"
type="application/x-webfont"
data="tribune.gif">
</OBJECT>
...view the poem in KublaKhan.txt here...
<P><OBJECT classid="http://foo.bar.com/poem_viewer"
data="KublaKhan.txt">
<PARAM name="font" valuetype="object" value="#tribune">
<P>You're missing a really cool poem viewer ...
</OBJECT>
13.4 Including an applet: the APPLET element
APPLET is deprecated
(with all its attributes) in favor of OBJECT.
In the following example, the APPLET
element includes a Java applet in the document. Since no codebase is supplied, the applet is
assumed to be in the same directory as the current document.
<APPLET code="Bubbles.class" width="500" height="500">
Java applet that draws animated bubbles.
</APPLET>
<P><OBJECT codetype="application/java"
classid="java:Bubbles.class"
width="500" height="500">
Java applet that draws animated bubbles.
</OBJECT>
The following sample Java applet:
<APPLET code="AudioItem" width="15" height="15">
<PARAM name="snd" value="Hello.au|Welcome.au">
Java applet that plays a welcoming sound.
</APPLET>
<OBJECT codetype="application/java"
classid="AudioItem"
width="15" height="15">
<PARAM name="snd" value="Hello.au|Welcome.au">
Java applet that plays a welcoming sound.
</OBJECT>
13.5 Notes on embedded documents
Sometimes, rather than linking to a document,
an author may want to embed it directly into a primary HTML
document. Authors may use either the IFRAME
element or the OBJECT element for this
purpose, but the elements differ in some ways. Not only do the two
elements have different content models, the IFRAME element may be a target frame (see the
section on specifying
target frame information for details) and may be "selected" by a
user agent as the focus for printing, viewing HTML source, etc. User
agents may render selected frames elements in ways that distinguish
them from unselected frames (e.g., by drawing a border around the
selected frame).
...text before...
<OBJECT data="embed_me.html">
Warning: embed_me.html could not be embedded.
</OBJECT>
...text after...
13.6
Image maps
Image maps allow authors to specify regions of an image or object and
assign a specific action to each region (e.g., retrieve a document,
run a program, etc.) When the region is activated by the user, the
action is executed.
13.6.1 Client-side image maps:
the MAP
and AREA
elements
<!ELEMENT MAP - - ((%block;)+ | AREA+) -- client-side image map -->
<!ATTLIST MAP
%attrs; -- %coreattrs, %i18n, %events --
name CDATA #REQUIRED -- for reference by usemap --
>
<!ELEMENT AREA - O EMPTY -- client-side image map area -->
<!ATTLIST AREA
%attrs; -- %coreattrs, %i18n, %events --
shape %Shape; rect -- controls interpretation of coords --
coords %Coords; #IMPLIED -- comma separated list of lengths --
href %URI; #IMPLIED -- URI for linked resource --
nohref (nohref) #IMPLIED -- this region has no action --
alt %Text; #REQUIRED -- short description --
tabindex NUMBER #IMPLIED -- position in tabbing order --
accesskey %Character; #IMPLIED -- accessibility key character --
onfocus %Script; #IMPLIED -- the element got the focus --
onblur %Script; #IMPLIED -- the element lost the focus --
>
Client-side image map examples
<HTML>
<HEAD>
<TITLE>The cool site!</TITLE>
</HEAD>
<BODY>
<P><OBJECT data="navbar1.gif" type="image/gif" usemap="#map1">
<MAP name="map1">
<P>Navigate the site:
<A href="guide.html" shape="rect" coords="0,0,118,28">Access Guide</a> |
<A href="shortcut.html" shape="rect" coords="118,0,184,28">Go</A> |
<A href="search.html" shape="circle" coords="184,200,60">Search</A> |
<A href="top10.html" shape="poly" coords="276,0,373,28,50,50,276,0">Top Ten</A><
</MAP>
</OBJECT>
</BODY>
</HTML>
<HTML>
<HEAD>
<TITLE>The cool site!</TITLE>
</HEAD>
<BODY>
<P><OBJECT data="navbar1.gif" type="image/gif" usemap="#map1">
</OBJECT>
...the rest of the page here...
<MAP name="map1">
<P>Navigate the site:
<A href="guide.html" shape="rect" coords="0,0,118,28">Access Guide</a> |
<A href="shortcut.html" shape="rect" coords="118,0,184,28">Go</A> |
<A href="search.html" shape="circle" coords="184,200,60">Search</A> |
<A href="top10.html" shape="poly" coords="276,0,373,28,50,50,276,0">Top Ten</A>
</MAP>
</BODY>
</HTML>
<P><OBJECT data="navbar1.gif" type="image/gif" usemap="#map1">
<P>This is a navigation bar.
</OBJECT>
<MAP name="map1">
<AREA href="guide.html"
alt="Access Guide"
shape="rect"
coords="0,0,118,28">
<AREA href="search.html"
alt="Search"
shape="rect"
coords="184,0,276,28">
<AREA href="shortcut.html"
alt="Go"
shape="circle"
coords="184,200,60">
<AREA href="top10.html"
alt="Top Ten"
shape="poly"
coords="276,0,373,28,50,50,276,0">
</MAP>
<P><IMG src="navbar1.gif" usemap="#map1" alt="navigation bar">
<P>
<OBJECT data="navbar.png" type="image/png">
<OBJECT data="navbar.gif" type="image/gif">
text describing the image...
</OBJECT>
</OBJECT>
<P>
<OBJECT data="navbar.png" type="image/png" usemap="#map1">
<OBJECT data="navbar.gif" type="image/gif" usemap="#map1">
<MAP name="map1">
<P>Navigate the site:
<A href="guide.html" shape="rect" coords="0,0,118,28">Access Guide</a> |
<A href="shortcut.html" shape="rect" coords="118,0,184,28">Go</A> |
<A href="search.html" shape="circle" coords="184,200,60">Search</A> |
<A href="top10.html" shape="poly" coords="276,0,373,28,50,50,276,0">Top Ten</A>
</MAP>
</OBJECT>
</OBJECT>
<MAP name="map1">
<P>
<A shape="circle" coords="100,200,50">I'm inactive.</A>
<A href="outer-ring-link.html" shape="circle" coords="100,200,250">I'm active.</A>
</MAP>
13.6.2
Server-side image maps
<P><A href="http://www.acme.com/cgi-bin/competition">
<IMG src="game.gif" ismap alt="target"></A>
13.7
Visual presentation
of images, objects, and applets
All IMG and OBJECT attributes that concern visual alignment
and presentation have been deprecated in favor of style
sheets.
13.7.1
Width and
height
13.7.2
White space around images and objects
13.7.3
Borders
13.7.4
Alignment
13.8
How to specify alternate text
For user agents that cannot display images, forms, or applets,
this attribute specifies alternate text. The language of the alternate
text is specified by the lang attribute.
The alt attribute must be specified for
the IMG and AREA
elements. It is optional for the INPUT and
APPLET elements.
Do not specify irrelevant alternate text when including images
intended to format a page, for instance, alt="red
ball" would be inappropriate for an image that adds a red ball
for decorating a heading or paragraph. In such cases, the alternate
text should be the empty string (""). Authors are in any case advised
to avoid using images to format pages; style sheets should be used
instead.
Implementors should consult the section on generating alternate text for
information about how to handle cases of omitted alternate text.