Incorporate the time2 Behavior

Internet Development Index

This tutorial explains how to incorporate the time2 behavior in your Web pages so you can begin using timelines, multimedia, and animation with HTML elements.

Using the time2 Behavior

Because Microsoft?Internet Explorer 5.5 provides support for HTML+TIME (Timed Interactive Multimedia Extensions) through an element behavior, you must add declarations for the time2 behavior to your page. The time2 behavior is available as of Internet Explorer 5.5 in the Microsoft Win32?platform.

The prefix t: associates an element with an Extensible Markup Language (XML) namespace. You must declare the XML namespace in the html tag of your document when using the element.

<HTML XMLNS:t ="urn:schemas-microsoft-com:time">

You must then import the tag definitions from the time2 behavior by using the IMPORT processing instruction.

<?IMPORT namespace="t" implementation="#default#time2">

Finally, you need to associate your element or elements with the time2 behavior. You can do this inline on a given element:

<DIV STYLE="behavior:url(#default#time2)";}... 

If you plan to use HTML+TIME features with more than a couple of elements on the page, you might find it less cumbersome to associate elements with the time2 behavior by creating a Cascading Style Sheets (CSS) class attribute.

<HTML>
<HEAD>
<STYLE>
.time {behavior: url(#default#time2);}
</STYLE>
</HEAD>
<BODY>
<DIV CLASS="time"...
</BODY>
</HTML>
This feature requires Microsoft?Internet Explorer 5.5 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

The Show Me button provides a short page template you can use to get started. Just copy the HTML and paste it into your Web document.

Related Topics