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.
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
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. |
Implicit ARIA role | No corresponding role |
Permitted ARIA roles | application , document , image
|
DOM interface | HTMLObjectElement
|
Attributes
This element includes the global attributes.
archive
HTML 4 onlyObsolete since HTML5- A space-separated list of URIs for archives of resources for the object.
border
Deprecated since HTML4.01Obsolete since HTML5- The width of a border around the control, in pixels.
classid
HTML 4 onlyObsolete 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 onlyObsolete 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 onlyObsolete since HTML5- The content type of the data specified by classid.
data
- The address of the resource as a valid URL. At least one of data and type must be defined.
declare
HTML 4 onlyObsolete 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. height
- The height of the displayed resource, in CSS pixels. -- (Absolute values only. NO percentages)
name
- The name of valid browsing context (HTML5), or the name of the control (HTML 4).
standby
HTML 4 onlyObsolete since HTML5- A message that the browser can show while loading the object's implementation and data.
tabindex
HTML 4 onlyObsolete since HTML5- The position of the element in the tabbing navigation order for the current document.
type
- 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 attribute and the actual content type of the resource must match to be used.
usemap
- A hash-name reference to a
<map>
element; that is a '#' followed by the value of aname
of a map element. width
- The width of the display resource, in CSS pixels. -- (Absolute values only. NO percentages)
Examples
Embed a flash movie
<!-- Embed a flash movie -->
<object data="movie.swf"
type="application/x-shockwave-flash"></object>
<!-- Embed a flash movie with parameters -->
<object data="movie.swf" type="application/x-shockwave-flash">
<param name="foo" value="bar">
</object>
Specifications
Specification | Status | Comment |
---|---|---|
HTML Living StandardThe definition of '<object>' in that specification. | Living Standard | |
HTML5The definition of '<object>' in that specification. | Recommendation | |
HTML 4.01 SpecificationThe definition of '<object>' in that specification. | Recommendation |
Browser compatibility
Note: Google Chrome doesn't support search for text (accessed via ctrl + F shortcut) inside <object></object>
tags.
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Update compatibility data on GitHub
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
object
|
Chrome
Full support Yes |
Edge
Full support 12 |
Firefox
Full support 1 |
IE
Full support Yes |
Opera
Full support Yes |
Safari
Full support Yes |
WebView Android
Full support Yes |
Chrome Android
Full support Yes |
Firefox Android
Full support 4 |
Opera Android
Full support Yes |
Safari iOS
Full support Yes |
Samsung Internet Android
Full support Yes |
|
Chrome
Full support Yes |
Edge
Full support 12 |
Firefox
Full support 1 |
IE
Full support Yes |
Opera
Full support Yes |
Safari
Full support Yes |
WebView Android
Full support Yes |
Chrome Android
Full support Yes |
Firefox Android
Full support 4 |
Opera Android
Full support Yes |
Safari iOS
Full support Yes |
Samsung Internet Android
Full support Yes |
Aspect ratio computed from width and height attributes
|
Chrome
Full support 79 |
Edge
Full support 79 |
Firefox Full support 71 Full support 71 No support 69 — 71 Disabled' From version 69 until version 71 (exclusive): this feature is behind the |
IE
No support No |
Opera
Full support 66 |
Safari
Full support 14 |
WebView Android
Full support 79 |
Chrome Android
Full support 79 |
Firefox Android
Full support 79 |
Opera Android
Full support 57 |
Safari iOS
Full support 14 |
Samsung Internet Android
Full support 12.0 |
|
Chrome
Full support Yes |
Edge
Full support 12 |
Firefox
Full support 1 |
IE
Full support Yes |
Opera
Full support Yes |
Safari
Full support Yes |
WebView Android
Full support Yes |
Chrome Android
Full support Yes |
Firefox Android
Full support 4 |
Opera Android
Full support Yes |
Safari iOS
Full support Yes |
Samsung Internet Android
Full support Yes |
|
Chrome
Full support Yes |
Edge
Full support 12 |
Firefox
Full support 1 |
IE
Full support Yes |
Opera
Full support Yes |
Safari
Full support Yes |
WebView Android
Full support Yes |
Chrome Android
Full support Yes |
Firefox Android
Full support 4 |
Opera Android
Full support Yes |
Safari iOS
Full support Yes |
Samsung Internet Android
Full support Yes |
|
Chrome
Full support Yes |
Edge
Full support 12 |
Firefox
Full support 1 |
IE
Full support Yes |
Opera
Full support Yes |
Safari
Full support Yes |
WebView Android
Full support Yes |
Chrome Android
Full support Yes |
Firefox Android
Full support 4 |
Opera Android
Full support Yes |
Safari iOS
Full support Yes |
Samsung Internet Android
Full support Yes |
|
Chrome
Full support Yes |
Edge
Full support 12 |
Firefox
Full support 1 |
IE
Full support Yes |
Opera
Full support Yes |
Safari
Full support Yes |
WebView Android
Full support Yes |
Chrome Android
Full support Yes |
Firefox Android
Full support 4 |
Opera Android
Full support Yes |
Safari iOS
Full support Yes |
Samsung Internet Android
Full support Yes |
data
|
Chrome
Full support Yes |
Edge
Full support 12 |
Firefox
Full support 1 |
IE
Full support Yes |
Opera
Full support Yes |
Safari
Full support Yes |
WebView Android
Full support Yes |
Chrome Android
Full support Yes |
Firefox Android
Full support 4 |
Opera Android
Full support Yes |
Safari iOS
Full support Yes |
Samsung Internet Android
Full support Yes |
|
Chrome
Full support Yes |
Edge
Full support 12 |
Firefox
Full support 1 |
IE
Full support Yes |
Opera
Full support Yes |
Safari
Full support Yes |
WebView Android
Full support Yes |
Chrome Android
Full support Yes |
Firefox Android
Full support 4 |
Opera Android
Full support Yes |
Safari iOS
Full support Yes |
Samsung Internet Android
Full support Yes |
form
|
Chrome
Full support Yes |
Edge
Full support 12 |
Firefox
Full support 1 |
IE
Full support Yes |
Opera
Full support Yes |
Safari
Full support Yes |
WebView Android
Full support Yes |
Chrome Android
Full support Yes |
Firefox Android
Full support 4 |
Opera Android
Full support Yes |
Safari iOS
Full support Yes |
Samsung Internet Android
Full support Yes |
height
|
Chrome
Full support Yes |
Edge
Full support 12 |
Firefox
Full support 1 |
IE
Full support Yes |
Opera
Full support Yes |
Safari
Full support Yes |
WebView Android
Full support Yes |
Chrome Android
Full support Yes |
Firefox Android
Full support 4 |
Opera Android
Full support Yes |
Safari iOS
Full support Yes |
Samsung Internet Android
Full support Yes |
name
|
Chrome
Full support Yes |
Edge
Full support 12 |
Firefox
Full support 1 |
IE
Full support Yes |
Opera
Full support Yes |
Safari
Full support Yes |
WebView Android
Full support Yes |
Chrome Android
Full support Yes |
Firefox Android
Full support 4 |
Opera Android
Full support Yes |
Safari iOS
Full support Yes |
Samsung Internet Android
Full support Yes |
|
Chrome
Full support Yes |
Edge
Full support 12 |
Firefox
Full support 1 |
IE
Full support Yes |
Opera
Full support Yes |
Safari
Full support Yes |
WebView Android
Full support Yes |
Chrome Android
Full support Yes |
Firefox Android
Full support 4 |
Opera Android
Full support Yes |
Safari iOS
Full support Yes |
Samsung Internet Android
Full support Yes |
|
Chrome
Full support Yes |
Edge
Full support 12 |
Firefox
Full support 1 |
IE
Full support Yes |
Opera
Full support Yes |
Safari
Full support Yes |
WebView Android
Full support Yes |
Chrome Android
Full support Yes |
Firefox Android
Full support 4 |
Opera Android
Full support Yes |
Safari iOS
Full support Yes |
Samsung Internet Android
Full support Yes |
type
|
Chrome
Full support Yes |
Edge
Full support 12 |
Firefox
Full support 1 |
IE
Full support Yes |
Opera
Full support Yes |
Safari
Full support Yes |
WebView Android
Full support Yes |
Chrome Android
Full support Yes |
Firefox Android
Full support 4 |
Opera Android
Full support Yes |
Safari iOS
Full support Yes |
Samsung Internet Android
Full support Yes |
typemustmatch
|
Chrome
? |
Edge
? |
Firefox
Full support 27 |
IE
? |
Opera
? |
Safari
? |
WebView Android
? |
Chrome Android
? |
Firefox Android
Full support 27 |
Opera Android
? |
Safari iOS
? |
Samsung Internet Android
? |
usemap
|
Chrome
Full support Yes |
Edge
Full support 12 |
Firefox
Full support 1 |
IE
Full support Yes |
Opera
Full support Yes |
Safari
Full support Yes |
WebView Android
Full support Yes |
Chrome Android
Full support Yes |
Firefox Android
Full support 4 |
Opera Android
Full support Yes |
Safari iOS
Full support Yes |
Samsung Internet Android
Full support Yes |
width
|
Chrome
Full support Yes |
Edge
Full support 12 |
Firefox
Full support 1 |
IE
Full support Yes |
Opera
Full support Yes |
Safari
Full support Yes |
WebView Android
Full support Yes |
Chrome Android
Full support Yes |
Firefox Android
Full support 4 |
Opera Android
Full support Yes |
Safari iOS
Full support Yes |
Samsung Internet Android
Full support Yes |
Legend
- Full support
- Full support
- No support
- No support
- Compatibility unknown
- Compatibility unknown
- Deprecated. Not for use in new websites.'
- Deprecated. Not for use in new websites.
- User must explicitly enable this feature.'
- User must explicitly enable this feature.
See also
<object> by Mozilla Contributors is licensed under CC-BY-SA 2.5.