The objective of HTML plug-ins is to expand the functionality of HTML browser such as in early ages the html browser did not support audio and video tags than these plug-ins were used to embed the media with webpage. These plug-ins are also known as html helpers used to display the maps and other media using <object> and <embed> tags.
Now we can use these plug-ins to embed different media like pdf, maps and many more with webpages.
HTML Plug-in Tags
Tag | Description |
<object> | It defines embedded object within html page. |
<embed> | It also defines embedded object within html page but it empty element and html deprecated tag. |
HTML Object Element
The <object> element is used to embed an object with html document such as pdf files and other plug-ins. The object tag is supported by all browsers. It is used to embed the html document within other html document.
<!DOCTYPE html> <html> <body> <h1>Names </h1> <object width="100%" height="500px" data="Names.pdf"></object> </body> </html>
Note: The data attribute of object element act as src attribute.
HTML Embed Element
The <embed> element is an empty element and is used to embed an object with html document such . The embed tag is supported by all major browsers. It is also used to embed the html document within other html document.
Note: The embed element is empty element as it do not have closing tag so, we alternative text cannot added in embed tag.