The HTML <object> element represents an external resource, which can be treated as an image, a nested browsing context, or a resource to be handled by a plugin.

Content categories Flow content; phrasing content; embedded content, palpable content; if the element has a usemap attribute, interactive content; listed, submittable form-associated element.
Permitted content zero or more <param> elements, then transparent.
Tag omission None, both the starting and ending tag are mandatory.
Permitted parents Any element that accepts embedded content.
Permitted ARIA roles application, document, image
DOM interface HTMLObjectElement


This element includes the global attributes.

archive HTML 4 only; Obsolete since HTML5
A space-separated list of URIs for archives of resources for the object.
border Deprecated since HTML4.01; Obsolete since HTML5
The width of a border around the control, in pixels.
classid HTML 4 only; Obsolete since HTML5
The URI of the object's implementation. It can be used together with, or in place of, the data attribute.
codebase HTML 4 only; Obsolete since HTML5
The base path used to resolve relative URIs specified by classid, data, or archive. If not specified, the default is the base URI of the current document.
codetype HTML 4 only; Obsolete since HTML5
The content type of the data specified by classid.
The address of the resource as a valid URL. At least one of data and type must be defined.
declare HTML 4 only; Obsolete since HTML5
The presence of this Boolean attribute makes this element a declaration only. The object must be instantiated by a subsequent <object> element. In HTML5, repeat the <object> element completely each that that the resource is reused.
form HTML5
The form element, if any, that the object element is associated with (its form owner). The value of the attribute must be an ID of a <form> element in the same document.
The height of the displayed resource, in CSS pixels.
The name of valid browsing context (HTML5), or the name of the control (HTML 4).
standby HTML 4 only; Obsolete since HTML5
A message that the browser can show while loading the object's implementation and data.
tabindex HTML 4 only; Obsolete since HTML5
The position of the element in the tabbing navigation order for the current document.
The content type of the resource specified by data. At least one of data and type must be defined.
typemustmatch HTML5
This Boolean attribute indicates if the type and the actual content type resource must match in order of this one to be used.
A hash-name reference to a <map> element; that is a '#' followed by the value of a name of a map element.
The width of the display resource, in CSS pixels.


Embed a flash movie

<!-- Embed a flash movie -->
<object data="movie.swf"

<!-- Embed a flash movie with parameters -->
<object data="movie.swf" type="application/x-shockwave-flash">
  <param name="foo" value="bar">


Specification Status Comment
WHATWG HTML Living Standard
The definition of '<object>' in that specification.
Living Standard
The definition of '<object>' in that specification.
HTML 4.01 Specification
The definition of '<object>' in that specification.

Browser compatibility

Feature Chrome Edge Firefox (Gecko) Internet Explorer Opera Safari
Basic support (Yes) (Yes) 1.0 (1.7 or earlier) (Yes) (Yes) (Yes)
typemustmatch ? ? 27 (27) ? ? ?
Feature Android Edge Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support (Yes) (Yes) 1.0 (1.0) (Yes) (Yes) (Yes)
typemustmatch ? ? 27.0 (27) ? ? ?

See also

© 2005–2017 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.