HTML <object> Tag
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 | |||||
12 | 1 | 1 | 15 | 3 |
Tablets / Mobile | |||||
18 | 4 | 14 | 2 | 1 | 4.4 |
Last updated by CSSPortal on: 30th March 2024