Chapter 41. Embedded Objects


  • Using applet and embed element objects

  • Exploring the object element object

  • Understanding the unusual param element

In addition to the typical content that you see in web pages—primarily text and images—you can embed other kinds of content into the page. Such embedded content usually requires the powers of additional software, such as plug-in players or other external code processors, to load and display the content. Historically, all of this external content has been added to web pages by one of three HTML elements: applet, embed, or object. In the HTML 4.0 standard, the applet element, which was intended originally for loading Java applets, is deprecated in favor of the newer object element. That has not stopped modern browser makers from supporting the applet element (which they must for backward compatibility anyway), and even Java's maker recommends continued use of the applet element for loading applets over the Internet.

A similar standards trend exists for the embed element, which, in theory anyway, may ultimately be replaced exclusively by the object element. Mozilla browsers, however, prefer that embedded content requiring plug-ins (such as Flash content) be loaded through an embed element.

An object element is intended to be more extensible than applet and embed, meaning that it has enough attributes and power to summon the Java virtual machine if the incoming code is a Java applet, or run an ActiveX program (in Internet Explorer ...

Get JavaScript® Bible, Sixth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.