HTML <object> (Embedded Object) Tag

❮ Previous Home Next ❯

embedded HTML page:


<object data="demo.html" width="300" height="600"></object>

embedded video:


<object data="video.mp4" width="300" height="150"></object>

embedded image:


<object data="img-boy.jpg" width="300" height="150"></object>


The <object> element specifies an arbitrary object to be included in an HTML document.

This element was used to insert ActiveX controls, but according to the specification, an object can be any media object, document, applet, interactive control, image, video.

Version: HTML 4, 4.01, 5

Standard Syntax

<object	data="URL" type="mediaType" width="pixels" height="pixels">...</object>

Browser Support



Attribute Value Description
data URL Specifies the address of the resource.
type mediaType Specifies the type of the resource.
name text Gives the name of the input element.
usemap hash-name Specifies a hash-name reference to a map element with which to associate the object.
form formId Associate the object element with its form owner.
width pixels Give the width of the visual content of the element, in CSS pixels.
height pixels Give the height of the visual content of the element, in CSS pixels.

Deprecated Attributes

Attribute Description
archive Deprecated. A space-separated list of URIs for archives of resources for the object.
border Deprecated. The width of a border around the control, in pixels.
classid Deprecated. The URI of the object's implementation. It can be used together with, or in place of, the data attribute.
codebase Deprecated. 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 Deprecated. The content type of the data specified by classid.
declare Deprecated. The presence of this Boolean attribute makes this element a declaration only.
standby Deprecated. A message that the browser can show while loading the object's implementation and data.

Global Attributes

<object> element also supports the Global Attributes in HTML.

Event Attributes

<object> element also supports the Event Attributes in HTML.

By Default CSS Value(s)

Most of the browsers will display the <object> element with the following by default value(s)

object:focus {
	outline: none;

Related Tags:

<audio>, <embed>, <iframe>, <img>, <map>, <object>, <param>, <picture>, <portal>, <source>, <track> and <video>
❮ Previous Reference Next ❯