HTML <object> Tag

Advertisements


Description

The HTML <object> tag is used to embed multimedia in an HTML document. The <param> tag is also used along with this tag to define various parameters.

Example:

<!DOCTYPE html>
<html>
<head>
<title>HTML object Tag</title>
</head>
<body>
<object data="data/test.htm" type="text/html" width="300" height="200">
  alt : <a href="data/test.htm">test.htm</a>
</object>
</body>
</html>

This will produce following result:

alt : test.htm

Global Attributes

This tag supports all the global attributes described in - HTML Attribute Reference

Specific Attributes

The HTML <object> tag also supports following additional attributes:

AttributeValueDescription
alignleft
right
top
bottom
Defines visual alignment of the object
archiveURLA space separated list of URL's to archives.
borderpixelsSpecifies border width around the object
classidClass IDDefines a class ID value as set in the Windows Registry or a URL.
codebaseURLSpecifies the path where object code is located.
codetypemime typeThe internet media type of the code referred to by the classid attribute.
dataURLSpecifies the URL for Object data.
declaredeclareDefines that the object should only be declared, not created or instantiated until needed.
heightpixelsSpecifies the hight of the object.
hspacepixelsSpecifies the horizontal space around the object.
nameobject
name
Specifies a unique name for the object
standbytextDefines a text to display while the object is loading.
typemime typeDefines the MIME type of data specified in the data attribute.
usemapURLSpecifies a URL of a client-side image map to be used with the object
vspacepixelsSpecifies the vertical space around the object.
widthpixelsSpecifies the width of the object.

Event Attributes

This tag supports all the event attributes described in - HTML Events Reference

Browser Support

ChromeFirefoxIEOperaSafariAndroid
YesYesYesYesYesYes

html_tags_reference.htm

Advertisements