O'Reilly logo

Web Design in a Nutshell, 2nd Edition by Jennifer Niederst Robbins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required