HTML <object> tag
HTML <object> tag
The <object>
tag is used to embed an object in an HTML document.
An object can be an audio, video, ActiveX, PDF, Flash Java items that are handled by browser plugins.
Example
HTML Online Editor
<!DOCTYPE html>
<html>
<body>
<object data="/resume.pdf" width="400" height="500"></object>
</body>
</html>
Attributes
The following are the attributes of <object> tag. Also try Global attributes.
Attribute | Value | Explanation |
---|---|---|
data | URL | Specifies the URL of the object (resource). |
form | form_id | Specifies the object belongs to one or more forms. |
height | px | Specifies the height of the object. |
name | name | Specifies the name of the object. |
type | media_type | Specifies the media_type of the object. |
typemustmatch | - | Specifies the type attribute and the actual content type of the resource must match to be used. |
usemap | #mapname | Specifies the partial URL (starting with #) of a map element associated with the element. |
width | px | Specifies the width of the object. |
Deprecated Attributes
The following attributes should not be used in any case.
Attribute | Value | Explanation |
---|---|---|
align |
| Specifies the alignment of the <object>. |
archive | URL | Specifies a space-separated list of URIs for archives of resources for the object. |
border | px | Specifies the width of the border around the object. |
classid | class_ID | Specifies the URI of the object's implementation. |
codebase | URL | Specifies the link to the object code. |
codetype | media_type | Specifies the content type of the data specified by classid. |
declare | - | Specifies the object is only declared, but not created. |
hspace | px | Specifies the whitespace on the left and right side of an object. |
standby | text | Specifies a text to display while the <object> element is loading the object from the server. |
vspace | px | Specifies the whitespace on the top and bottom side of an object. |
Reminder
Hi Developers, we almost covered 99.5% of HTML Tutorials with examples for quick and easy learning.
We are working to cover every Single Concept in HTML.
Please do google search for:
Join Our Channel
Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.
This channel is primarily useful for Full Stack Web Developer.