HTML Object: The purpose of a plug-in, is to extend the functionality of the HTML browser.

Plug-ins are computer programs that extend the standard usefulness of the browser.


Plug-ins

Plug-ins were designed to be used for various purposes:

• To run Java applets

• To run Microsoft ActiveX controls

• To show maps

• To scan for viruses

• To check a bank id

Cautioning !

Most browsers at this point don’t support Java Applets and Plug-ins.

ActiveX controls are presently not support in any browsers.

The support for Shockwave Flash has additionally been turned off in modern browser.


The <object> Element

The <object> element is supported by all browsers.

The <object> element defines an embedded object inside an HTML document.

It was designed to embed plug-ins (like Java applets, PDF readers, and Flash Players) in website pages, but can likewise be used to include HTML in HTML:

Example

<object width="100%" height="500px" data="snippet.html"></object>

Or images if you like:

Example

<object data="corola.jpeg"></object>

The <embed> Element

The <embed> element is supported in all significant browsers.

The <embed> element likewise defines an embedded object inside an HTML document.

Internet browsers have supported the <embed> element for quite a while. Nonetheless, it has not been a part of the HTML detail before HTML5.

Example

<embed src="corola.jpeg">

Note that the <embed> element doesn’t have a closing tag. It can not contain alternative text.

The <embed> element can likewise be used to include HTML in HTML:

Example

<embed width="100%" height="500px" src="snippet.html">

Thanks for reading! We hope you found this tutorial helpful and we would love to hear your feedback in the Comments section below. And show us what you’ve learned by sharing your projects with us.


0 Comments

Leave a Reply

Avatar placeholder