HTML Tutorial | HTML5 Multimedia | Plug-ins

Plug-ins

An HTML plug-in is a program that extends the standard features of a web browser.
Commonly known plug-ins include Java Applet, Flash Player, and PDF Reader.
These plug-ins can be added to an HTML document by using the object element or the embed element.

object Element

The object element is used to specify an object to insert into an HTML document. This element works in all web browsers and can insert another HTML document as well as an object.

Example

<object data="/examples/media/sample_plugins_pdf.pdf" style="width:100%; height:700px"></object>

The object element can also be used to insert an image.

Example

 <object data="/examples/images/img_flower.png"></object>

embed Element

The embed element is used to specify an object to insert into an HTML document.
The embed element has been used for a long time, but it was not part of the HTML standard before HTML5.
This element works in all web browsers and can insert an HTML document as well as an object.

Example

 <embed src="/examples/media/sample_plugins_pdf.pdf" style="width:100%; height:700px">

The embed element can also be used to insert an image.

Example

<embed src="/examples/images/img_flower.jpg" style="width:350px; height:263px">

The embed element was not an HTML standard before HTML5, so it is valid in HTML5 but not valid in HTML4.