## Objects

Internet Explorer supports objects according to the WWW Consortium (W3C) object model extension to HTML 3.2. Objects add functionality to your HTML document by letting you insert images, video, and programs, such as Java applets, and ActiveX controls.

To insert an object, you use the OBJECT element, supplying attribute values that specify the object type, location, initial data, and so on. If the object has configurable properties, you can set these using the PARAM element. The following example shows how to insert the marquee ActiveX Control and fill it with content:

    <OBJECT
    ALIGN=CENTER CLASSID="clsid:1a4da620-6217-11cf-be62-0080c72edd2d"
    WIDTH=200 HEIGHT=200 BORDER=1 HSPACE=5
    ID=marquee>
    <PARAM NAME="ScrollStyleX" VALUE="Circular">
    <PARAM NAME="ScrollStyleY" VALUE="Circular">
    <PARAM NAME="szURL" VALUE="marqcont.htm">
    <PARAM NAME="ScrollDelay" VALUE=60>
    <PARAM NAME="LoopsX" VALUE=-1>
    <PARAM NAME="LoopsY" VALUE=-1>
    <PARAM NAME="ScrollPixelsX" VALUE=0>
    <PARAM NAME="ScrollPixelsY" VALUE=-3>
    <PARAM NAME="DrawImmediately" VALUE=0>
    <PARAM NAME="Whitespace" VALUE=0>
    <PARAM NAME="PageFlippingOn" VALUE=0>
    <PARAM NAME="Zoom" VALUE=100>
    <PARAM NAME="WidthOfPage" VALUE=400>
    </OBJECT>

This displays as:

In this example, the OBJECT element specifies the class identifier of the control (assumed to be already installed and registered) and the alignment, width, height, and other attributes of the control. The series of PARAM elements sets the values for the individual properties of the control, determining how and when the contents are scrolled. The szURL property determines which HTML document is used as content.

A matching end-tag is required for each OBJECT element. Within these elements, you can place one or more PARAM elements. You can also place any elements and text that you would ordinarily use in the body of the HTML document, but these elements and text are not processed and displayed unless the HTML viewer does not process the OBJECT element. To learn more about the inclusion of objects in HTML, read Microsoft's documentation for the ActiveX Engineer's Guide and Object Reference.

EMBED

Microsoft Internet Explorer 3.0 will support the EMBED element syntax for embedding objects on an HTML page. This support is meant for compatibility with other browsers. The accepted WWW Consortium (W3C) HTML standard recommends using the OBJECT element for embedding objects in HTML, and Internet Explorer 3.0 supports this syntax as well.

OBJECT Compatibility

Internet Explorer 3.0 supports the OBJECT element. Browsers that comply with the accepted W3C HTML standard will understand this HTML syntax. However, the OBJECT syntax degrades gracefully in other browsers as well, because browsers that are compatible with the OBJECT element will ignore additional elements placed within the OBJECT element. The following illustrates how to use the OBJECT element but allow content to be viewable by other browsers:

    <OBJECT
      CLASSID="clsid:05589FA1-C356-11CE-BF01-00AA0055595A" WIDTH=100 HEIGHT=250>
         <PARAM NAME=SRC VALUE="TheEarth.AVI">
         <PARAM NAME=AUTOSTART VALUE=TRUE>
         <PARAM NAME=PLAYBACK VALUE=FALSE>
         <EMBED SRC="TheEarth.AVI" WIDTH=100 HEIGHT=250 AUTOSTART=TRUE
    PLAYBACK=FALSE>
    </OBJECT>

In browsers that support the OBJECT element, the EMBED element will be ignored. Browsers that do not support OBJECT will ignore the OBJECT element and PARAM attribute.

© 1996 Microsoft Corporation