Full width home advertisement

How To

Science

Post Page Advertisement [Top]


The <object> element allows HTML developers set everything needed by an object for its presentation by a user agent. HTML 4 brings in the <object> element, which provides an all-purpose solution to generic object inclusion. 

Example - 1

Embeding an HTML document in a self HTML document:


<object data="data/test.htm" type="text/html" width="300" height="200">

alt : <a href="data/test.htm">test.htm</a>

</object>


Note: The alt attribute will come be previewed if browser does not support object tag.


Example - 2


Embedding PDF document in an HTML document:


<object data="data/test.pdf" type="application/pdf" width="300" height="200">

alt : <a href="data/test.pdf">test.htm</a>

</object>




Example - 3

Setting certain parameters related to the document with the <param> tag.:


<object data="data/test.wav" type="audio/x-wav" width="200" height="20">

<param name="src" value="data/test.wav">

<param name="autoplay" value="false">

<param name="autoStart" value="0">

alt : <a href="data/test.wav">test.wav</a>

</object>




Example - 4

You can also add a flash document as below:


<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="penguin"

codebase="flash/swflash.cab" width="200" height="300">

<param name="movie" value="flash/test.swf" />

<param name="quality" value="high" />

<img src="penguin.jpg" width="200" height="300" alt="Test" />

</object>




Example - 5

Adding a java applet into HTML document as follows:


<object classid="clsid:8ad9c840-044e-11d1-b3e9-00805f499d93"

width="200" height="200">

<param name="code" value="applet.class">

</object>


Note: The classid attribute helps to shows which version of Java Plug-in to use.

No comments:

Post a Comment

Bottom Ad [Post Page]

| Designed by Colorlib