Home > Articles

  • Print
  • + Share This

Executable Content Elements

One of the ways in which Web pages have become more dynamic is through their support of executable content, such as Java applets and ActiveX controls. These page elements are downloaded to the browser and run in its memory space to produce dynamic content on the browser screen.

XHTML 1.0 supports the <object> element for placing executable content. This element, along with the supporting <param/> element, is profiled in this section.





Places an executable object on a page.


<object classid= "implementation_info" codebase="URL_of_object"
 codetype="MIME_type" data="URL_to_data" type="data_MIME_type"
 archive="list_of_archives" usemap="map_name" tabindex="tab_position"
 standby="message_while_loading" declare="declare"
 width="width_in_pixels_or_percentage" name="object_name"


The <object> element has an exhausting list of attributes, which makes it flexible enough to handle many different types of content (Java applets, ActiveX controls, and so on). These attributes include

  • archive—Set equal to a comma-delimited list of archive locations.

  • classid—Identifies which implementation or release of the object you're using.

  • codebase—Set equal to the URL of the object.

  • codetype—Describes the code's MIME type.

  • data—Set equal to list of URLs where data for the object can be found.

  • declare—Instructs the browser to declare, but not instantiate, a flag for the object.

  • standby—Enables you to display a message to the user while the object is loading.

  • type—Specifies the MIME type of the data passed to the object.

  • usemap—Points to client-side map data, if image maps are used.

  • width and height—Specifies the size of the object on the page.


<object width="100%" height="100" codetype="application/x-oleobject "
 classid="CLSID: 1A4DA620-6217-11CF-BE62-0080C72EDD2D"
 <param name="image" value="greeting.gif"/>
 <param name="speed" value="7"/>
 <param name="repeat" value= "1"/>

Related Elements:

Parameters passed to the object are given by the <param /> element.

<param />




Passes a parameter to an executable object placed by the <object> element.


<param id="unique_identifier" name="parameter_name"
 value="parameter_value" valuetype="data|ref|object"
 type="expected_content_type" />


The <param /> element can take the following attributes:

  • id—Assigns a unique identifying name to the parameter.

  • name—Provides the name of the parameter.

  • type—Tells the browser what the parameter's Internet media (MIME) type is.

  • value—Specifies the value of the parameter.

  • valuetype—Provides more detail about the nature of the value being passed and can be set to data, ref, or object.


<object code="test.class" name="test">
  <param id="p1" name="tolerance" value="0.001" valuetype="data" />
  <param id="p2" name="pi" value="3.14159" valuetype="data" />

Related Elements:

<param /> elements can be used within an <object> element.


The HTML <APPLET> element is not allowed under the Strict XHTML DTD, but you can use it with the Transitional and Frameset DTDs.

  • + Share This
  • 🔖 Save To Your Account

Related Resources

There are currently no related titles. Please check back later.