HTML 4 object Tag
Also see HTML5 <object>
Tag.
This page is for the HTML 4 version of this element. For a more up to date version, see HTML5 <object>
Tag.
The HTML object
tag is used for embedding an object within an HTML document. Use this tag to embed multimedia in your web pages.
You can also use the <param>
tag to supply parameters to your embedded object.
Example
In this example, if the applet can't be loaded, it will attempt to load the file specified next (the image file). If that can't be loaded, it will display the text specified next.
Attributes
Attributes specific to this tag: | |
---|---|
Attribute | Description |
classid | Specifies the location of the object either as a URI or a Windows Registry location. |
codebase | Specifies the URI of the applet. |
codetype | Specifies object type when the object is specified by the classid attribute. If absent, defaults to the value specified in the type attribute. |
data | Specifies the location of data to be used by the object. |
type | Specifies the object type as specified in the data attribute. Must be a valid MIME type. |
archive | Space-separated list of archive URI's containing resources to be preloaded. |
declare | Specifies to only declare the object at this stage. The object would then need to be instatiated by a separate object definition referring to this declaration. |
standby | Specifies a message to display to the user while the object is loading. |
Other Attributes: | |
Attribute | Description |
class | Document wide identifier. |
id | Document wide identifier |
dir | Specifies the direction of the text |
lang | Language code |
style | Inline style (CSS). |
title | Specifies a title to associate with the element. |
tabindex | Helps determine the tabbing order (when the user 'tabs' through the elements on the page). |
name | Form submission. Assigns the control name. |
usemap | Image map. |
width | Width to display the object. |
height | Height to display the object. |
border | Specifies a border for the object. |
align | Visual alignment (i.e. bottom, middle, top, left, right). Deprecated. |
hspace | Amount of white space to be inserted to the left and right of the object. Deprecated. |
vspace | Amount of white space to be inserted above and below the object. Deprecated. |
onclick | Intrinsic event (see event handlers) |
ondbclick | Intrinsic event (see event handlers) |
onmousedown | Intrinsic event (see event handlers) |
onmouseup | Intrinsic event (see event handlers) |
onmouseover | Intrinsic event (see event handlers) |
onmousemove | Intrinsic event (see event handlers) |
onmouseout | Intrinsic event (see event handlers) |
onkeypress | Intrinsic event (see event handlers) |
onkeydown | Intrinsic event (see event handlers) |
onkeyup | Intrinsic event (see event handlers) |
HTML5 Tags
The information on this page is based on HTML version 4.01. Most modern browsers now support HTML5.
See HTML5 <object>
Tag for the HTML5 version of the above element.
See this list of HTML tags for the latest list of HTML elements.