Objects

The Image element is a historical relic from early versions of HTML. Today, images are only one of many forms of 'foreign' object that may be embedded in an XHTML document. Other options include sound and video clips, and program code (such as Java applets).

Object element

The Object element supersedes and extends the Image element. As its name implies, this element represents any 'foreign' object in an XHTML document, of which images are only one category. The Data attribute is a URL reference to the data to be loaded. The Type attribute is the MIME type of the data:

<object data="boat.gif" type="image/gif" ... />
<object data="bobbing_boat.mov"
        type="application/quicktime" ... />

Just as for images, an object can be given an area ...

Get XML Companion, The, Third 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.