<object> HTML Tag
Disclosure: Your support helps keep the site running! We earn a referral fee for some of the services we recommend on this page. Learn more
- Element of
- Applets
- What does
<object> HTML Tag
do? - The <object> element is used to embed an object in an HTML document. It is commonly used to embed webpage elements such as Flash and Java items that are handled by browser plugins.
- Display
- inline
When to Use the Object Element
Use the object
element to pull in external multimedia content.
In most cases, object
is used to embed content that is supported by browser plugins. In theory, it can be used to display images, but the <img>
element is more suitable for this purpose.
Code Example
<object data="flashmovie.swf" width="600" height="800" type="application/x-shockwave-flash">
Please install the Shockwave plugin to watch this movie.
</object>
Note that the type
attribute tells the browser which plugin to load to display the content, but you only need to specify either type
or data
– not necessarily both. Any text that you include between the <object>
and </object>
tags will be displayed if the plugin is not available.
Browser Support for object
All | All | All | All | All | All |