HTML Plugin
The function of a plugin is to extend the capabilities of an HTML browser.
HTML Helper (Plugin)
A helper application is a program that can be launched by the browser. Helper applications are also known as plugins.
Helper applications can be used to play audio and video (among other things). Helper applications are loaded using the <object>
tag.
One advantage of using helper applications to play video and audio is that you can allow users to control some or all of the playback settings.
Plugins can be added to a page using the <object>
tag or the <embed>
tag.
Most helper applications allow manual (or programmatic) control of volume settings and playback functions (such as rewind, pause, stop, and play).
>
Note:
Most browsers no longer support Java applets and plugins.
Most modern browsers have discontinued support for Flash.
The following example of an swf file will not work properly in modern browsers.
| | We can use <video>
and <audio>
tags to display video and audio |
| --- | --- |
<object>
Element
All major browsers support the <object>
tag.
The <object>
element defines an embedded object within an HTML document.
This tag is used to insert objects (such as Java applets, PDF readers, Flash players) into a webpage.
Example
<object width="400" height="50" data="bookmark.swf"></object>
The <object>
element can also be used to include an HTML file:
Example
<object width="100%" height="500px" data="snippet.html"></object>
Or to insert an image:
Example
<object data="audi.jpeg"></object>
<embed>
Element
All major browsers support the <embed>
element.
The <embed>
element represents an HTML Embed object.
The <embed>
element has been around for a long time but was not well-defined until HTML5. This element will be validated in HTML5 pages but not in HTML4.
Example
<embed width="400" height="50" src="bookmark.swf">
| | Note that the <embed>
element does not have a closing tag. Alternative text cannot be used. |
| --- | --- |
The <embed>
element can also be used to include an HTML file:
Example
<embed width="100%" height="500px" src="snippet.html">
Or to insert an image:
Example
<embed src="audi.jpeg">