<object> ... </object>

A generic element used for embedding media (such as an image, applet, movie, audio, or even another HTML file) on a web page. The attributes required for the object element vary with the type of content it is placing. The object element may contain content that will be rendered if the object cannot be embedded. The object element may also contain a number of param elements that pass important information to the object when it displays or plays. Not all objects require additional parameters. The object and param elements work together to allow authors to specify three types of information:


The object element began as a proprietary element in Internet Explorer to support ActiveX and later Java applets. Browser support for the object element does not live up to the W3C’s vision of object as an all-purpose object placer; for example, it is not currently possible to reliably place images with the object element.

Start/End Tags



  • HTML 4.01
  • HTML5


Values: bottom | middle | top | left | right
Deprecated. Not in HTML5. Aligns object with respect to surrounding text.
Aligns the bottom of the object with the text baseline. This is the default vertical alignment.
Aligns the object on the left margin and allows subsequent text to wrap around it.
Aligns the text baseline with the middle of the object.
Aligns the object on the right margin and allows subsequent text to wrap around it.
Aligns the top of the object with the top of the tallest object on that line.


Values: URLs
Not in HTML5. Specifies a space-separated list of URLs for resources that are related to the object.


Values: number
Deprecated. Not in HTML5. Sets the width of the border in pixels if the object is a link.


Values: URI
Not in HTML5. Identifies the location of an object’s implementation. It is used with or in place of the data attribute. The syntax depends on the object type. Not supported by Gecko browsers.


Values: URI
Not in HTML5. Identifies the base URL used to resolve relative URLs in the object (similar to base). By default, codebase is the base URL of the current document.


Values: content-type
Not in HTML5. Specifies the media type of the code. It is required only if the browser cannot determine an applet’s MIME type from the classid attribute or if the server does not deliver the correct MIME type when downloading the object.


Values: URI
Specifies the address of the resource. The syntax depends on the object.


Values: None in HTML. (declare="declare" in XHTML)
Not in HTML5. Declares an object but restrains the browser from downloading and processing it. Used in conjunction with the name attribute, this facility is similar to a forward declaration in a more conventional programming language, letting you defer the download until the object actually gets used.


Values: form id
HTML5 only. Associates the object with a form element on the page.


Values: number
Specifies the height of the object in pixels.


Values: number
Deprecated. Not in HTML5. Specifies the number of pixels of clear space to the left and right of the object.


Values: text
Specifies the name of the object to be referenced by scripts on the page.


Values: message
Not in HTML5. Specifies the message to display during object loading.


Values: number
Specifies the position of the current element in the tabbing order for the current document. The value must be between 0 and 32,767. It is used for tabbing through the links on a page (or fields in a form).


Values: type
Specifies the media type of the resource.


Values: URL
Specifies the image map to use with the object.


Values: number
Deprecated. Not in HTML5. Specifies the number of pixels of clear space above and below the object.


Values: number
Specifies the object width in pixels.
<object classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6"
height="280" width="320"
  <param name="URL" value="movies/europe.wmv">
  <param name="autoStart" value="false">
  <param name="UIMode" value="full">
You do not have Windows Media Player installed.
Get it here. </object>

Rendered Example

This embedded media can not be displayed in this application.