HTML <object> tag
When writing in HTML, the <object> tag is a block element used to designate an object embedded into a web page. It is useful for adding plugin handled resources such as Java applets, Flash, PDF, and ActiveX as well as audio and video. Similar to <iframe>, the <object> tag allows you to nest one web page within another.
The following sections contain information about this tag, including an example of it in use, as well as related attributes and browser compatibility.
Tip: The <param> tag may be used to pass parameters to a plugin that has been embedded using the <object> tag.
Example of <object> code
<object type="application/x-shockwave-flash" height="60" width="60" data="https://www.computerhope.com/jargon/f/flash.swf">
Your browser does not support the <object> tag.
Within an HTML tag, an attribute dictates certain aspects of an HTML element. Attributes are made up of a name and value pair; all tags support standard attributes. The following table shows all of the current unique HTML attributes for the <object> tag, as well as a description of each.
|data||Designates the URL of the resource embedded in the <object> element.|
|form||Designates the form(s) to which an object belongs.|
|height||Designates the height of the object.|
|name||Designates a name for the object.|
|type||Designates the media type of data specified by the data attribute.|
|usemap||Designates that an image is a client-side image map.|
|width||Designates the width of the image.|
A deprecated attribute is one that may function currently but is not supported in going forward. While the attribute may work with the current version of HTML, it will eventually be phased out. It is better to avoid using these attributes to help future-proof your website.
|align||Designates the alignment of the object with respect to the content around it.|
|archive||Designates a list of URL's to different archives.|
|border||Designates the width of the border surrounding the object.|
|classid||Designates a class ID value as set in the Windows Registry or a URL.|
|codebase||Designates the location of an object's code.|
|codetype||Designates the media type of the code listed in the classid attribute.|
|declare||Designates that the object should only be declared, not created or represented until called.|
|hspace||Designates the whitespace on right and left side of an object.|
|standby||Designates the text that displays while the object loads.|
|vspace||Designates the whitespace above and below an object.|
|All versions||All versions||All versions||All version||All versions||All versions|