HTML 4 object Tag

Also see HTML5 <object> Tag.

This page contains information about 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.


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 specific to this tag:
classidSpecifies the location of the object either as a URI or a Windows Registry location.
codebaseSpecifies the URI of the applet.
codetypeSpecifies object type when the object is specified by the classid attribute. If absent, defaults to the value specified in the type attribute.
dataSpecifies the location of data to be used by the object.
typeSpecifies the object type as specified in the data attribute. Must be a valid MIME type.
archiveSpace-separated list of archive URI's containing resources to be preloaded.
declareSpecifies 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.
standbySpecifies a message to display to the user while the object is loading.
Other Attributes:
classDocument wide identifier.
idDocument wide identifier
dirSpecifies the direction of the text
langLanguage code
styleInline style (CSS).
titleSpecifies a title to associate with the element.
tabindexHelps determine the tabbing order (when the user 'tabs' through the elements on the page).
nameForm submission. Assigns the control name.
usemapImage map.
widthWidth to display the object.
heightHeight to display the object.
borderSpecifies a border for the object.
alignVisual alignment (i.e. bottom, middle, top, left, right). Deprecated.
hspaceAmount of white space to be inserted to the left and right of the object. Deprecated.
vspaceAmount of white space to be inserted above and below the object. Deprecated.
onclickIntrinsic event (see event handlers)
ondbclickIntrinsic event (see event handlers)
onmousedownIntrinsic event (see event handlers)
onmouseupIntrinsic event (see event handlers)
onmouseoverIntrinsic event (see event handlers)
onmousemoveIntrinsic event (see event handlers)
onmouseoutIntrinsic event (see event handlers)
onkeypressIntrinsic event (see event handlers)
onkeydownIntrinsic event (see event handlers)
onkeyupIntrinsic event (see event handlers)

HTML5 Tags

The information on this page is based on HTML version 4.01. Most modern browsers now support HTML5, which is the next version of HTML after HTML 4.01.

See HTML5 <object> Tag for the HTML5 version of the above element.

Also see this list of HTML 5 tags for the latest version of HTML.