10.3. The Object Tag

The object tag (<object>) was introduced to replace both the <embed> and <applet> tag means of embedding objects (non-HTML content) within HTML documents. The <object> tag has the following syntax:

<object classid="class_id" id="object_id" codebase="base_for_object_code_URI"
  codetype="MIME_type_of_object" width="width_of_object"
  height="height_of_object" >
Alternate_text_for_object
  ...parameters...
</object>

The object tag encapsulates alternate text that is used if the object cannot be handled by the destination user agent and parameters defined by parameter tags (<param>).

The <param> tag is covered in the next section.

The object tag's attributes are listed in the following table:

AttributeValue(s)Use
archiveURL(s)URLs to archives related to the object
classidclass_idA URL to the implementation for the object
codebaseURLA URL to the location of the code to utilize the object
codetypeMIME typeThe MIME type of the object
dataURLA URL to the object's data
declaretrue | falseDetermines if the object should only be declared but not initialized (true), or initialized and displayed after loaded (false)
heightpixels | percentageThe displayed height of the object
nameunique_nameA unique name for the object (used in scripting)
standbytextDefines text to display while the object loads
typeMIME typeThe MIME type of the data specified by the data attribute
usemapURLSpecifies the location of a client-side image map to use with the object
widthpixels | percentageThe displayed width ...

Get Web Standards Programmer's Reference: HTML, CSS, JavaScript®, Perl, Python®, and PHP 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.