generic embedded object


<object>

Browser
Internet Explorer Firefox Opera
Type
Inline-block

The OBJECT element defines an embedded object.

This element is used to embed objects of various types into document.


<object classid="clsid:*****" codebase="http://*****" width="300" height="150"> - </object>

<object data="example.jpg" type="image/jpeg" width="200" height="100"> - </object>


Attribute Value Explanation
data=" " URL the URL of the object data
type=" " MIME type the MIME type of data specified in the data attribute
classid=" " URL or class ID the URL of the class file or the class ID of the ActiveX control
codetype=" " MIME type the MIME type of data specified in the classid attribute
codebase=" " URL the base URL for data and classid
width=" " pixels or % the width of the object
height=" " pixels or % the height of the object

The OBJECT element can be used instead of the following elements.
EMBED element, APPLET element, IMG element, IFRAME element, BGSOUND element

Example with parameter

The PARAM element is placed inside the OBJECT element.

<object classid="clsid:*****" codebase="http://*****" width="200" height="100">
<param name="para1" value="123">
<param name="para2" value="abc">
</object>

Defines the alternative content

The content of the OBJECT element is displayed by the browsers that do not support this element.

<object classid="clsid:*****" codebase="http://*****" width="200" height="100">
<param name="para1" value="123">
<param name="para2" value="abc">

<img src="example.gif" alt="Example" width="200" height="100">
</object>


Example

Example of embedding Flash

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://*****" width="300" height="150">

<param name="movie" value="example.swf">
<param name="loop" value="false">
<param name="quality" value="high">
<param name="wmode" value="transparent">
<param name="bgcolor" value="#ffffff">

<embed src="example.swf" loop="false" quality="high" wmode="transparent" bgcolor="#ffffff" width="300" height="150" type="application/x-shockwave-flash" pluginspage="http://*****"></embed>

</object>

Example of embedding HTML document

<p><object data="example.html" type="text/html" width="300" height="100"></object></p>
Output


Example of embedding images

<p>
<object data="example.jpg" type="image/jpeg" width="200" height="150"></object>
<object data="example.gif" type="image/gif" width="200" height="150"></object>
</p>
Output