The <object> tag is used for embedding media contents (such as images, Java applets, Flash, movie, audio, or even another HTML file) on a web page.
The object element is partially supported in all major browsers, depend on the object inserted into HTML document.
If the object element is not displayed, the code between the <object> and </object> tags will be executed, so you can add an alternative text or an image.
This element is designed to include any sort of document. It uses the type attribute to indicate the "mime type", and the data attribute to indicate the source of the document (its URI).
If the browser (or one of its plugin) can interpret the embedded object, will download and play /run it, otherwise the nested content of the object is displayed.
Any HTML code can be inserted as an alternative content, for example a link to the document or an image.
<object type="application/pdf" data="dir/html_course.pdf" width="300" height="200"> <img src="dir/html_course.jpg" alt="HTML course" /> </object>- Here the browser will show a PDF document if it supports the PDF format, otherwise it will show a JPG image (html_course.jpg).
<object type="text/html" data="dir/test.html" width="500" height="350"> alt: <a href="dir/test.html" title="Test">test.html</a> </object>- If the browser can't use the object element to include an "text/html" file, will show the link added between the <object> and </object> tags (alt: test.html).
<object type="application/x-shockwave-flash" data="games/cubilus.swf" width="500" height="250"> <param name="src" value="html/l/cubilus.swf" /> <param name="bgcolor" value="#fbfbfe" /> Your browser not support SWF. </object>If the browser supports SWF application, will display the "cubilus" game, otherwise shows the text: "Your browser not support SWF."
<object type="audio/x-wav" data="dir/test.wav" width="200" height="20"> <param name="src" value="dir/test.wav" /> <param name="autoplay" value="false" /> <param name="autoStart" value="false" /> Alt : <a href="dir/test.wav" title="WAV file">test.wav</a> </object>- Depending on the object, the major browsers use different codes to load the same object type. QuickTime understand the "autoplay" parameter. Windows media Player and Real Audio understand "autoStart" parameter.
<object type="audio/mpeg" data="audio/test.mp3" width="200" height="20"> <param name="src" value="audio/test.mp3"> <param name="autoplay" value="false" /> <param name="autoStart" value="false" /> Your system can't play audio/mpeg files. </object>
<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="480" height="360"> <param name="src" value="dir/movie.mov"> <param name="controller" value="true" /> <param name="autoplay" value="false" /> <object type="video/quicktime" data="dir/movie.mov" width="480" height="360"> <param name="controller" value="true" /> <param name="autoplay" value="false" /> You do not have QuickTime Player installed. </object> </object>
<p>Address: <strong>http://CoursesWeb.net/</strong> - Tutorials.</p>
#id { font-weight: 800; }
function someFunction() { alert("CoursesWeb.net"); } setInterval("someFunction()", 2000);
$vname = 8; echo $vname;