Embedded Media Files
Images aren’t the only things that can be displayed as part of a web page. You can also include content such as Quicktime movies, interactive Flash files, all manner of Java applets, and more. The browser renders embedded media files using the provided code (as in the case of an applet), using its built-in display devices (as for GIF or JPEG images), or by taking advantage of a plug-in or helper application.
The three tags that embed media in HTML are
<object>
(the HTML 4.01 preference for all
media), <applet>
(for Java applets;
deprecated in HTML 4.01), and <embed>
(for
plug-in dependent media; not even recognized in HTML 4.01). Following
are overviews of each of these tags and their uses.
The <object> Tag
The
<object>
tag
is an all-purpose object-placer. It can be used to place a variety of
object types on a web page, including applets (Java or
ActiveX), multimedia objects, and even plain
old images.
It began as a proprietary tag 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 full support in Version 6. Currently, the
<object>
tag enjoys a hearty endorsement by
the HTML 4.01 specification as the “right” way to add any
media object to a web page.
The <object>
tag has a large number of attributes that customize its use to the type of media being placed. It shares ...
Get Web Design in a Nutshell, 2nd 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.