The object element began as a
proprietary element in Internet Explorer to support ActiveX and later
Java applets. Netscape Navigator initially supported only embed and applet (discussed later in this chapter) for
embedding media, but added limited object support in its Version 4 release, and
improved (yet still improperly implemented) support in Version 6. The
W3C intends the object element, now
part of the HTML 4.01 and XHTML Recommendations, to be a replacement
for the more specific img and
applet elements as well as the
nonstandard embed and bgsound (used for background sounds).
The attributes required for the object element vary with the type of content
it is placing. The object element
may also contain a number of param
elements that pass important information to the object when it
displays or plays. Not all objects require additional
parameters.
The object and param elements work together to allow
authors to specify three types of information:
- The implementation of the object.
That is, the executable code that runs in order to render the object. This may be a tool or player required to display an external file (such as the QuickTime plug-in for showing a .mov file), or it may be the object itself, such as a self-contained clock applet. The implementation is specified with the
classidattribute.- The data to be rendered.
The
dataattribute specifies the URL of the data; in most cases, an external file, such as a movie or a PDF file. According to the HTML 4.01 spec, thedataattribute ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access