HTML <object> Tag

If this site has been useful, we’d love your support! Running this site takes time and resources, and every small contribution helps us keep creating valuable content. Consider buying us a coffee to keep things going strong!

Description

The <object> HTML element tells the browser how to load and display objects that the browser does not understand initially. Typically, such objects require a special module called a plug-in to connect to the browser, or the launch of an auxiliary program.
Additionally, the <param> element can be placed inside the <object> container, which passes additional parameters for displaying the object.

Properties

Permitted Parents
Any element that accepts embedded content
Content
Block, inline, and text; any <param> elements must come first
Start/End Tags
Start tag: required, End tag: required

Example

<object title="Elevator">
<param name="audio" value="elev.au">
<param name="width" value="200">
<param name="height" value="100">
</object>

Attributes

Attribute Definition
data Defines a URL that refers to the object's data
type Defines the MIME type of data specified in the data attribute
name Defines the name for an object (to use in scripts)
usemap Specifies a URL of a client-side image map to be used with the object
width Defines the width of the object
height Defines the height of the object

Global Attributes

The <object> tag also supports the Global Attributes in HTML5

Event Attributes

The <object> tag also supports the Event Attributes in HTML5

Browser Support

The following table will show you the current browser support for the HTML <object> tag.

Desktop
Edge Chrome Firefox Opera Safari
1211153
Tablets / Mobile
Chrome Firefox Opera Safari Samsung Webview
18414214.4

Last updated by CSSPortal on: 30th March 2024