Name

<OBJECT> — NN 4 IE 3 HTML 4

Synopsis

<OBJECT>...</OBJECT>

End Tag: Required

The OBJECT element supplies the browser with information to load and render data types that are not natively supported by the browser. If the browser must load some external program (a Java applet, a plugin, or some other helper), the information about the content that is to be rendered is contained by the OBJECT element, its attributes, and optionally, associated PARAM elements nested inside of it. Although today’s browsers recognize elements such as APPLET and EMBED, the HTML specification indicates that the trend is to combine all of this into the OBJECT element.

The HTML 4.0 specification allows nesting of OBJECT elements to give the browser a chance to load alternate content if no plugin, or other necessary content aids, is available in the browser. Essentially, the browser should be able to walk through nested OBJECT elements until it finds one it can handle. For example, the outer OBJECT element may try to load an MPEG2 video; if no player is available, the browser looks for the next nested OBJECT, which is a JPEG still image from the video; if the browser is not a graphical browser, it would render some straight HTML that is the most nested item (although not as an OBJECT element) within the hierarchy of nested OBJECTs:

<DIV>
<OBJECT data="proddemo.mpeg" type="application/mpeg">
    <OBJECT data="prodStill.jpg" type="image/jpeg">
        The all-new Widget 3000!
    </OBJECT>
</OBJECT>
</DIV>

HTML 4.0 details ...

Get Dynamic HTML: The Definitive Reference 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.