|
Animation is tricky to use but, if done tastefully, can enhance your site. Animated GIFs are the simplest and most common forms of animation on the Web. However, you can also add animation through Java applets and Flash animation. HTML animations such as <marquee> and <blink> are discouraged because they are presentational elements. In the transitional world of XHTML 1.0, they are discouraged; in the strict world of XHTML 1.1 and even stricter world of XHTML 2.0, they are not permitted. The following table lists some of the basic code you will need to add animations to your Web pages:
To Do This | Use This |
---|---|
Add an animated GIF | <img src="/books/4/238/1/html/2/animation.gif" /> |
Add a Java applet with <object> |
<object class |
Add a Java applet with <applet> (deprecated) | <applet code="applet.class" width="##" height="##"> </applet> |
Add parameters to an applet | <param name="name" value="value" /> |
Add a scrolling marquee (discouraged) | <marquee>Text</marquee> |
Control a marquee’s behavior | <marquee behavior="value"> |
Control a marquee’s direction | <marquee direction="value"> |
Control a marquee’s speed in pixels | <marquee scrollamount="value"> |
Control a marquee’s speed in milliseconds | <marquee scrolldelay="value"> |
Create blinking text with <blink> (discouraged) | <blink>Blinking Text</blink> |
Create blinking text with CSS | selector {text-decoration: blink} |
|