adsense


Monday, 12 October 2015

HTML 5 OBJECT TAG PAGE 27


HTML 5 OBJECT TAG



HTML Object tag

HTML 4 introduces the <object> element, which offers an all-purpose solution to generic object inclusion. The <object> element allows HTML authors to specify everything required by an object for its presentation by a user agent
Here are few examples:
Example - 1
You can embed an HTML document in an HTML document itself as follows:
<object data="data/test.htm" type="text/html" width="300" height="200">
  alt : <a href="data/test.htm">test.htm</a>
</object>
Here alt attribute will come into picture if browser does not support object tag.
Example - 2
You can embed a PDF document in an HTML document as follows:
<object data="data/test.pdf" type="application/pdf" width="300" height="200">
  alt : <a href="data/test.pdf">test.htm</a>
</object>
Example - 3
You can specify some parameters related to the document with the <param> tag. Here is an example to embed a wav file:
<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 add a flash document as follows:
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="penguin" 
   codebase="someplace/swflash.cab" width="200" height="300">
   <param name="movie" value="flash/penguin.swf" />
   <param name="quality" value="high" />
   <img src="penguin.jpg" width="200" height="300" alt="Penguin" />
</object>
Example - 5
You can add 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>
An HTML marquee is a scrolling piece of text displayed either horizontally across or vertically down your webpage depending on the settings. This is created by using HTML <marquees> tag.
Note: The HTML <marquee> tag may not be supported by various browsers so its not recommended to rely on this tag, instead you can use Javascript and CSS to create such effects.
Syntax
A simple syntax to use HTML <marquee> tag is as follows:
<marquee attribute_name="attribute_value"....more attributes>

One or more lines or text message or image

</marquee>

No comments: