It represents an external resource, which can be treated as an image, a media player, a nested browsing context or a resource to be handled by a plugin. It can only <param>
elements.
The <object>
tag was originally designed to embed browser Plug-ins.
Most browsers no longer support Java Applets and Plug-ins. ActiveX controls are no longer supported in any browser. The support for Shockwave Flash has also been turned off in modern browsers.
- To embed a picture, it is better to use the
<img>
tag. - To embed HTML, it is better to use the
<iframe>
tag. - To embed video or audio, it is better to use the
<video>
and<audio>
tags.
It can have three implicit ARIA roles: application
, document
or image
.
Attributes
data
The address of the resource as a valid URL. At least one of data
and type
must be defined.
form
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).
type
The content type of the resource specified by data
. At least one of data
and type
must be defined.
usemap
A hash-name reference to a <map>
element; that is a #
followed by the value of a name
of a map element.
width
The width of the display resource, in CSS pixels (absolute values only. NO percentages).
- Type: block
- Self-closing: No
- Semantic value: No
Top comments (0)