Published Mar 24, 2022Updated Jul 1, 2022
Contribute to Docs

The <object> element represents some resource external to the HTML document. This resource can be treated as an image, an embedded browsing context, or as content to be handled by a browser plugin.


<object type="MIME type" data="URL of resource"></object>

The <object> element requires the following attributes to work properly:

  • A type attribute that tells the browser what content media (MIME) type will be displayed. (“application/pdf”, “application/x-java-applet”, “audio/mp4”, etc.)
  • A data attribute that contains the URL to the resource being used.

This element may contain zero or more <param> elements to pass parameters on to the resource it is displaying:

<object type="MIME type" data="URL of resource">
<param name="parameter name" value="parameter value" />



All contributors

Looking to contribute?

Learn HTML on Codecademy