<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
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.

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.

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.

Claire is seasoned technical writer, editor, and HTML enthusiast. She writes for HTML.com and runs a content agency, Red Robot Media.

Browser Support for object