Quick Reference: Adding Animation


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 
width="##" height="##"> </object>

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">
(values are scroll, slide, or alternate)

Control a marquee’s direction

<marquee direction="value">
(values are left and right)

Control a marquee’s speed in pixels

<marquee scrollamount="value">
(value in pixels)

Control a marquee’s speed in milliseconds

<marquee scrolldelay="value">
(value in milliseconds)

Create blinking text with <blink> (discouraged)

<blink>Blinking Text</blink>

Create blinking text with CSS

selector {text-decoration: blink}




How to Do Everything with HTML & XHTML
How to Do Everything with HTML & XHTML
ISBN: 0072231297
EAN: 2147483647
Year: 2003
Pages: 126

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net