object Element


 

Module

The object element is declared by the XHTML 1.1 Object Module

Elements in the Object Module are:
object
param (Param Support Module)

Description

The object element is used to include a generic embedded object within a document.

If the user agent does not understand the type of object specified, it should try to render the contents of the object element instead. This may be an alternative object element or other XHTML content (which should be appropriate to the context of the object element's location, e.g. block-level code should not be included if the object is situated in an inline context where block-level content is not allowed).

Although not explicitly required by the XHTML 1.1 DTD, a comment within the DTD states that any param elements should be placed prior to other content in the object element (ref: *Embedded Object Module DTD at the W3C).

I do not use the object element often so I will just point you in the direction of the W3C Specification *HTML 4.01 - Generic inclusion: the OBJECT element (which has the same function as this corresponding XHTML element).

#REQUIRED Attributes

There are no #REQUIRED attributes on the object element.


Specific Attributes

Specific attributes of the object element are listed below:

From the Object Module - the Element's own Module

archive [ type URIs ]
A space-separated list of URIs of archived files (e.g. Java .jar files) which are relevant to the object (relative URIs are with respect to the codebase attribute, if present). Specifying archives might result in a faster load time for the object, since they can be preloaded (the resources in classid and data attributes may be included here)
classid [ type URI ]
A URI specifying the location of an implementation for the object, e.g. Java or Python applet (relative URIs are with respect to the codebase attribute, if present). If this attribute is specified, the codetype (or type) attribute should be as well (so that the user agent can avoid loading unsupported content types)
codebase [ type URI ]
The base URI for relative classid, archive and data URIs (default value is the current document's base URI)
codetype [ type ContentType ]
Specifies the MIME type of the object (specified in the classid attribute) - if absent, the value of the type attribute is used instead.
data [ type URI ]
A URI specifying the location of the object's data (relative URIs are with respect to the codebase attribute, if present). If this attribute is specified, the type attribute should be as well (so that the user agent can avoid loading unsupported content types)
declare [ type Boolean ]
If present, this indicates that the object should be declared but not instantiated.
height [ type Length ]
The height of the object, either in pixels or as a percentage of the available vertical space (usually the parent element's height) - this will override any natural object height, and the object will be appropriately scaled
name [ type CDATA ]
A name by which to refer to the object - can also be used to submit an object as part of a form
standby [ type Text ]
A message to be displayed while the object is loading
tabindex [ type Number ]
An integer between 0 and 32767 specifying the position of the object in the tabbing order of the document
type [ type ContentType ]
Specifies the MIME type of the object's data (specified in the data attribute) Note, however, that the HTTP header returned by the server takes precedence
width [ type Length ]
The width of the object, either in pixels or as a percentage of the available horizontal space (usually the parent element's width) - this will override any natural object width, and the object will be appropriately scaled

From the Client-side Image Map Module

usemap [ type IDREF ]
The id of a map element to be applied to the object

Common Attributes

Common attributes of the object element are listed below:

From the Core Attribute Collection

class [ type NMTOKENS ]
One or more space separated classes
id [ type ID ]
A unique identifier for the element
style [ type CDATA ], from the Style Attribute Module (deprecated)
Element-specific styles
title [ type Text ]
Descriptive title for the element (in some user agents this may appear as a "tooltip" when the mouse hovers over the element)
xmlns [ type URI - #FIXED 'http://www.w3.org/1999/xhtml' ]
XML namespace

From the I18N Attribute Collection

dir [ type Enumeration (ltr | rtl) ], from the Bi-directional Text Module
Left-to-right or right-to-left directionality
xml:lang [ type LanguageCode ]
A language code for the element

From the Events Attribute Collection

All attributes in the Events Attribute Collection are supported:
onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup


Content Model

The Content Model for the object element is:

( #PCDATA | Flow.mix | param )*

See Content Model & Nesting for information about Content Model syntax and Nesting Groups.

Valid children of object

Valid parents of object


Page Footer & Copyright

Copyright © Sally Maughan 2005-2009 (Page last updated on 01 Oct 2009)

*Valid XHTML 1.1 - hosted by *Openstrike

Content based on the W3C Working Draft: *XHTML 1.1 and Recommendation: *XHTML Modularisation 1.1.

W3C, XHTML, XML, HTML, CSS and MathML are *Trademarks of the W3C (*MIT, *ERCIM, *Keio) with which the site's author has no connection.


Up, Next & Previous Links

Your Location

Home > XHTML 1.1 Home > XHTML 1.1 Indexes > Element Index (XHTML 1.1) > object Element