content logo

Learn HTML:

Html object tag

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="/html/test.jpg" type="text/html" width="300" height="200">
  alt : <a href="/html/test.htm">test.jpg</a>
</object>
</body>
</html>

Specific Attributes

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

Attribute Value Description
align left
right
top
bottom
Defines visual alignment of the object
archive URL A space separated list of URL's to archives.
border pixels Specifies border width around the object
classid Class ID Defines a class ID value as set in the Windows Registry or a URL.
codebase URL Specifies the path where object code is located.
codetype mime type The internet media type of the code referred to by the classid attribute.
data URL Specifies the URL for Object data.
declare declare Defines that the object should only be declared, not created or instantiated until needed.
height pixels Specifies the hight of the object.
hspace pixels Specifies the horizontal space around the object.
name object
name
Specifies a unique name for the object
standby text Defines a text to display while the object is loading.
type mime type Defines the MIME type of data specified in the data attribute.
usemap URL Specifies a URL of a client-side image map to be used with the object
vspace pixels Specifies the vertical space around the object.
width pixels Specifies the width of the object.
#HTML Object Example #HTML Object Code #HTML Object Tutorial