HTML <object> tag

You are Here:

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.

AttributeValueExplanation
dataURLSpecifies the URL of the object (resource).
formform_idSpecifies the object belongs to one or more forms.
heightpxSpecifies the height of the object.
namenameSpecifies the name of the object.
typemedia_typeSpecifies 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#mapnameSpecifies the partial URL (starting with #) of a map element associated with the element.
widthpxSpecifies the width of the object.

Deprecated Attributes

The following attributes should not be used in any case.

AttributeValueExplanation
align
  • top
  • bottom
  • middle
  • left
  • right
Specifies the alignment of the <object>.
archiveURLSpecifies a space-separated list of URIs for archives of resources for the object.
borderpxSpecifies the width of the border around the object.
classidclass_IDSpecifies the URI of the object's implementation.
codebaseURLSpecifies the link to the object code.
codetypemedia_typeSpecifies the content type of the data specified by classid.
declare-Specifies the object is only declared, but not created.
hspacepxSpecifies the whitespace on the left and right side of an object.
standbytextSpecifies a text to display while the <object> element is loading the object from the server.
vspacepxSpecifies 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.

Share this Page

Meet the Author