With more formats are requiring different information, adding multimedia is trickier than adding an image. Add multimedia to your page using the OBJECT element.

Currently, most images are inserted into your page using the IMG element, but even images will eventually be inserted using the OBJECT element.

Object <OBJECT>

Start Tag: Required
Content: Alternate text

Other OBJECT elements
One or more PARAM elements, description of what should appear

End Tag: Required

Attributes:

id, class, lang, dir, events
declare: Boolean flag indicating the object is declared but should not be
instantiated; if you use this attribute, you’ll have to instantiate the object later with another OBJECT element

classid: URL of object’s implementation; may be used either in conjunction with or instead of the data attribute, depending on the object

codebase: URL of base point for resolving relative references related to this object (specifically from the classid, data, and archive attributes)

codetype: content type of object specified in classid attribute in MIME format; saves time for a visitor downloading a content type that his or her browser can’t render

data: URL of the object’s data

type: MIME type of data specified in the data attribute; saves time for a visitor downloading a content type that his or her browser can’t render

archive: list of URLs in space-delimited format that gives resources relative to the object’s classid and data attributes; it may include the object’s classid and data attributes; and the browser should preload the archive, which results in a quicker object load

standby: a message that the browser may show while loading the object
title: title of this element
style: define style here to override style sheet
usemap: URL of client-side image map
name: name for form submission
height: height of object; use if overriding the actual image height
width: width of object; use if overriding the actual image width
align, hspace, vspace, border: deprecated; should be specihfgfied in style sheet
tabindex: tabbing order (for forms)

The OBJECT element can be very confusing. Fortunately, you will probably never need to use all attributes at the same time.

The OBJECT element can be nested into a sort of pecking order. Your browser uses the first instance of the nested OBJECT element that it supports. If you, as a Web developer, put the spiffiest items first, then the visitor sees the coolest multimedia that his/her browser can support without realizing the missing items, as shown in the upcoming example.

You want to include a model of a protein molecule for your cool chemistry site. The coolest model is the VRML version of the molecule, which is 3D and rotates and zooms at the visitor’s discretion. Unfortunately, the visitor needs to have a computer that can handle 3D rendering and a VRML player installed.

The next coolest way to show the model uses a QuickTime VR model of the molecule. This method enables the visitor to rotate the model without the ability to zoom and travel through the molecule.

If the visitor can’t even handle the QuickTime VR model, use an MPEG movie of the molecule bonding with another molecule. The last option is a GIF image of the molecule. For text-only browsers, settle for a short, text description of the molecule.

The following creates the nested OBJECT elements for this example:

<OBJECT classid=”http://nmc.itc.virginia.edu/nlii/Grisham/
vrml/modelA1.wrl” codetype=”application/wrl” height=”250”
width=”600”>
<OBJECT classid= “http://nmc.itc.virginia.edu/qtvr/atp_
synthase.qtvr” codetype=”application/quicktime”>
<OBJECT data=”synthase.mpeg” type=”application/mpeg”>
<OBJECT data=”atp_synthase.gif” type=”image/gif”>
You are missing the ATP Synthase molecule.
</OBJECT>
</OBJECT>
</OBJECT>
</OBJECT>