XHTML/XHTML Objects

In HTML, objects could only be attached to specific image tags or object tags. This changed with XHTML, where these images or resources can be attached to almost any tag.

Images
Images can be explicitly specified with the  tag. XHTML also provides the ability to attach images to  tags as described blow. A significant change from HTML is that there is no longer an alt attribute to describe the image if it cannot load; instead, the content enclosed within the tag pair (if any) is displayed if the resource cannot be loaded.

The  attribute contains a URL to the resource in question. If the resource can be loaded, it replaces the tag with the object itself. Otherwise, the content within the tags is displayed instead. This attribute is used in combination with, which provides information about the resource in question. Typically, it may appear as "image/png" or "image/jpeg".

The  attribute identifies the character set of the resource, if it is a text document.

An image can also be used as a navigation map with the  attribute, which refers to an id of a navigation list within the element. The  tags within the navigation list will have the   and   elements to specify the details of the navigation map.

Objects
Arbitrary objects within XHTML are declared by the  tag. The object itself is loaded from the  attribute. If the object is loaded successfully, it will be loaded with the parameters enclosed within the object tag. However, a failure will cause the enclosed to be rendered instead.

The following attributes are used:

Parameters
Within the object tag, parameters can be included to provide information to the loaded object.

The  tag uses two base attributes;   which is the name of the parameter, and   which is the content of the parameter. In addition, the param tag can also use  if the parameter's value is a reference (ref) or object (object). Be default, the value type of the parameter is data.

Standby
Content within a  tag is displayed when an object is loading, but hasn't yet finished.

Scripting objects
The  tag indicates a script that handles events within the document. If the browser is unable to load the handler, it will process the content enclosed within the handler tag pair instead, including additional nested handler elements.

With the handler element, the  attribute is mandatory. It describes the scripting language used, such as "text/javascript".