WikiGalaxy

Personalize

HTML Plug-ins

HTML plug-ins are powerful tools used to embed external content into a web page. 

This chapter covers essential elements like <object><embed>, and others used for integrating external resources such as multimedia, PDFs, and interactive applications.

The <object> Element

The <object> element is a versatile HTML tag that allows embedding multimedia (e.g., videos, audio, PDFs) or other types of external resources into a webpage. It can handle fallback content if the object is not supported by the user's browser.

<object data="URL_of_the_resource" type="MIME_type" width="value" height="value">
        Fallback content goes here.
</object>

Embedding a PDF

Embedded PDF

  • Displays a PDF file within the webpage.

Fallback Content

Provides a download link if the browser doesn’t support inline PDFs.

The <embed> Element

The <embed> element is another HTML tag for embedding external content such as multimedia files and applications. Unlike <object>, <embed> does not support fallback content.

<embed src="URL_of_the_resource" type="MIME_type" width="value" height="value">

Embedding a Video

Embedded Video

This is the description of the point with a heading. The description text is styled with a light gray for clarity.

No Fallback

If the browser does not support the <embed> tag, the content will not be displayed.

Feature

<object>

<embed>

Fallback

Supports fallback content

No fallback support

Use Cases

Versatile: PDFs, videos, audio, etc.

Primarily for media

Customization

More flexible with attributes

Limited flexibility

Using Both Elements Together

<!-- Using Embed -->
<h2>Video Player</h2>
<embed src="example.mp4" type="video/mp4" width="640" height="360">

Output:

</body><html>

Both <object> and <embed> are essential tools for embedding external content, with each suited to specific scenarios

While <object> offers more flexibility and fallback options, <embed> provides a simpler and straightforward approach for embedding multimedia.

By understanding the distinctions and use cases, developers can effectively leverage these elements to enhance the user experience.

logo of wikigalaxy

Newsletter

Subscribe to our newsletter for weekly updates and promotions.

Privacy Policy

 • 

Terms of Service

Copyright © WikiGalaxy 2025