HTML <object> Tag
The object tag is used to contain external resources such as Audio, Video, Flash, PDFs, external apps, and browser plug-ins in an HTML document.
The <object>
tag is more typically used to embed resources than the <embed>
element due to compatibility difficulties.
The <object>
element is another frequent name for this tag.
Syntax
Attributes
Attribute | Value | Description |
---|---|---|
data | URL | Specifies the URL of the resource that the object will utilize. |
form | form-id | This property specifies the object's shape. |
height | pixels | The object's height is specified. |
name | name | The object's name is specified here. |
type | media-type | The media type of data supplied in the data attribute is specified here. |
typemustmatch | true/false | Specifies whether the type attribute and the resource's actual content must match in order for the resource to be shown. |
usemap | mapname | Name of a client-side image map that will be used with the object. |
width | pixels | The width of the object is specified. |
Supported Browsers
Element | Chrome | Firefox | Safari | Edge / IE | Opera |
---|---|---|---|---|---|
<object> | Yes | Yes | Yes | Yes | Yes |