<object>
Browser |
|
---|---|
Type |
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>