HTML Reference Guide


Tag Index| Content List| HTML FAQ

<OBJECT> ... </OBJECT> OBJECT

Description:

The OBJECT element is a proposal from the W3C that will replace and absorb the many methods in use to include multi-media and embedded content in HTML documents. This element can replace all of the functionality in the existing APPLET, EMBED, BGSOUND, SOUND and IMG elements. In order to achieve this, the element has many attributes that require some explanation.

When using OBJECT in place of the APPLET element, the PARAM element is used exactly as it would be with the APPLET element.

Attributes:

align - This attribute specifies the alignment of text following the OBJECT reference relative to the object on screen. LEFT and RIGHT specify floating horizontal alignment of the object in the browser window, and subsequent content will wrap around the object. The other options specify vertical alignment of text relative to the object on the same line.

border - This controls the thickness of the border around the object (in pixels.)

classid - This attribute is a URL indicating the implementation for the OBJECT. In some systems this is a class identifier.

codebase - This attribute allows the author to specify the URL of the OBJECT's implementation, which some URL schemes require in addition to the CLASSID URL.

codetype - This attribute specifies the MIME type of the code referenced by the CLASSID attribute in advance of actually retrieving it. Browsers may use this value to skip over unsupported MIME types without needing to make a network access.

data - his attribute indicates a URL pointing to the OBJECTs data, such as a GIF file for an image. If the CLASSID attribute is absent, the media (MIME) type of the data is used to determine a default value for the CLASSID attribute. The implementation is then loaded as if the CLASSID attribute had been explicitly specified.

declare - This is a stand-alone attribute which indicates an object that is not created or instantiated until needed by something that references it (i.e. late binding.) Each such "binding" typically results in a separate copy of the object (this is class dependent.) So in such cases, DECLARE is treated as a declaration for making an instance of an object. See the DECLARE explanation in the OBJECT specification for more details.

export - This is a stand-alone attribute which allows an image map defined within this element's content to be exported to an enclosing OBJECT element. This is only useful when inner and outer OBJECT elements are both images and have the same size.

height - This attribute explicitly specifies the height of the object in pixels. It can be used to speed up display of the document being downloaded so it can pre-render the document with object placeholders while the object downloads.

hspace - This attribute specifies the horizontal spacing around objects in pixels (left and right padding.)

name - This provides a way for the object to participate in a FORM submission process. If the NAME attribute is specified and the DECLARE attribute is absent, then the browser should use the data obtained from the OBJECT [the method used to obtain the data from the object is specific to each object] paired with the NAME in the FORM submission process.

shapes - This attribute indicates the OBJECT contains hyperlinks associated with shaped regions of the visible area of the OBJECT. When this attribute is used, the contents of the OBJECT element will be hyperlinks with new hybrid client-side image mapping attributes. These are used to create a backward compatible system for map navigation. Please see the attributes of the Hyperlink [A HREF] element for implementation details of this attribute.

standby - This allows you to specify a short text string for the browser to display while it loads the OBJECT's implementation and data. The character data can include character entities.

tabindex - "Tabbing" is a method of giving access/focus to an active HTML element using a standard keyboard sequence. All the active elements in a document can be cycled through using this sequence (ex: Windows TAB key.) The order of the active elements in this cycle is usually the order they occur in the document, but the TABINDEX attribute allows a different order to be established. The use of this attribute should create the following tabbing order cycle if the browser supports the attribute:

1.Active elements using the TABINDEX attribute with positive integers are navigated first. Low values are navigated first.
2.Active elements not specifying any TABINDEX attribute.
Those elements carrying a DISABLED attribute or using negative TABINDEX values do not participate in the tabbing cycle.

type - This attribute specifies the MIME type of the data referenced in the DATA attribute in advance of retrieving it. In the absence of the CLASSID attribute, it allows the browser to retrieve the code implementing the OBJECT concurrently with the data and to skip over unsupported MIME types without having to make network accesses.

usemap - This attribute specifies the URL (usually internal to the document) of the client-side image map specification to be used if the browser has that capability. If the argument to USEMAP begins with a "#" it is assumed to be in the current dcument. Client-side coordinate mapping is done by the browser, so is inherently faster in processing the coordinates than the old ISMAP process for the IMG element. This attribute is usually only used for static image OBJECTs.

vspace - This attribute specifies the vertical spacing around objects in pixels (top and bottom padding.)

width - This attribute explicitly specifies the width of the object in pixels. It can be used to speed up display of the document being downloaded so it can pre-render the document with object placeholders while the object downloads.

Example code:

<object CODETYPE="application/java-vm" CODEBASE="http://www.foo.com/applet.class" CLASSID="java:program.start" HEIGHT="100" WIDTH="100"><param NAME="options" VALUE="xqz"> If you can read this you are too close.<br> AND your browser does not support Java.</object>

Result:

If you can read this you are too close.
AND your browser does not support Java.

See Also: