<object> ... </object>
Available in versions: 4.0
The <object> tag is used to insert an object
(such as ActiveX components, applets, image maps, media players, and plug-ins)
into an HTML document and to provide all of the
neccessary information to implement and run the object.
For example, you can give the location and type of the executable code of the object,
and the location and type of any associated data files.
You have the option to declare and instantiate the object at the same time,
or declare the object and instantiate it, one or more times, elsewhere in the program.
This tag can be placed in the head and the body element.
If it is placed in the head, the object cannot be used to render (display)
content onto the page.
(No tag in the head is permitted to render content.)
The param tag is used to pass any parameters (run-time values) required
to implement the object.
This tag must appear immediately after the opening object tag,
but before any other content.
Note that the applet tag is deprecated effective with version 4.0.
In its place, you are to use the object tag (and the classid
attribute) to insert a Java applet into a web page.
The closing tag is mandatory.
Core Attributes
class
dir
id
lang
onclick
ondblclick
onkeydown
onkeypress
onkeyup
onmousedown
onmousemove
onmouseout
onmouseover
onmouseup
style
title
Attributes
align deprecated 4.0
The align attribute is used to position the object with respect to
any surrounding text, images, or other objects.
This attribute is deprecated effective with version 4.0.
However, most browsers continue to recognize this attribute.
You are now to use style sheets.
archive
The archive attribute is a comma-separated list of URLs of object resources,
including resources specified by the classid and data attributes,
that must be preloaded into the local user cache before the object can be displayed.
If the URLs are relative, you must provide the base URL using the codebase
attribute.
classid
The classid attribute is used to provide the URL location of the object.
If the URL is relative, you must provide a base URL using the codebase
attribute.
When using this attribute, you may also wish to specify the program code type
of the object by using the codetype attribute.
codebase
The codebase attribute is used to specify the base URL of the directory where the object
is stored.
This allows the use of relative URLs in other attributes.
If the directory is different from where the HTML code is stored, you must use this attribute.
codetype
The codetype attribute is used to specify the program code type (MIME type)
of the object.
The default is to allow the browser to determine the program code type.
The data files code type is specified by using the type attribute.
data
The data attribute is used to specify the URL location of the data files associated
with the object (such as images).
If the URL is relative, you must provide a base URL using the codebase
attribute.
declare
The declare attribute is a Boolean value that, if present, signifies that
the object is a declaration only and prevents the browser from downloading and
executing the object.
(When you declare an object, you should also assign a value to the id attribute.
This id can be referenced at a later time when you instantiate the object.)
height
The height attribute is used to set the vertical extent of the object in pixels.
hspace
The hspace attribute is used to add additional blank space in pixels
to each side of the object.
name
The name attribute is used to assign a unique string of characters
as the name of the object (which allows the object to be referenced).
standby
The standby attribute is used to display a message while the object
is loading.
This is a wise precaution for slow-loading objects and should be considered
a courtesy to the user.
tabindex
The tabindex attribute specifies an integer that defines the rank in the tabbing
order for the specified element when you use the keyboard to navigate (tab through) a page.
This attribute is poorly supported.
type
The clear attribute is used to specify the data files code type (MIME type)
of the object.
The default is to allow the browser to determine the data file code type.
The program code type is specified by using the codetype attribute.
usemap
The usemap attribute is used to indicate that the object is a
client-side image map.
vspace
The vspace attribute is used to add additional blank space in pixels
both above and below the object.
width
The width attribute is used to set the horizontal extent of the object in pixels.
This example displays the Microsoft MSCAL calendar.
Code:
<object classid="clsid:8E27C92B-1264-101C-8A2F-040224009C02" ID="calFormDate" width="372" height="200>
</object>
Output:
Copyright 2000 by Infinite Software
Solutions, Inc.
Trademark Information
|