Animated Text

In what appears to be an effort to woo advertisers, Internet Explorer added a form of animated text to HTML that all the popular browsers now support. The animation is simple—text scrolling horizontally across the display—but effective for moving banners and other elements that readily and easily animate an otherwise static document. On the other hand, like the <blink> tag, animated text can easily become intrusive and abusive for the reader. Use with caution, please, if at all.

The <marquee> Tag

The <marquee> tag defines the text that scrolls across the user’s display. The <marquee> tag is not a standard tag. For this reason alone, we do not recommend that you use this extension.

The text between the <marquee> tag and its required </marquee> end tag scrolls horizontally across the display. The various tag attributes control the size of the display area, its appearance, its alignment with the surrounding text, and the scrolling speed.

The <marquee> tag and attributes are ignored by some browsers, but its contents are not. They are displayed as static text, sans any alignment or special treatment afforded by the <marquee> tag attributes.

The align attribute

The popular browsers place <marquee> text into the ...

Get HTML & XHTML: The Definitive Guide, 6th Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.