Wiz's Template Design Course for eBay Sellers

The MARQUEE tag

The marquee tag is not an official HTML tag. It is a Microsoft HTML extension and it is not supported by any of the older browsers except Microsoft Internet Explorer, however the new releases of the most popular browsers, including Netscape, Opera and Mozilla also now support it.

I generally try to stay away from non-standard tags here at my HTML Help site because I strongly believe in giving the beginner a stong foundation is how to do it right. However, the marquee tag is so popular and now that it is being widely accepted, it's probably a good idea to take a look at it.

The construction is very simple. Anything you want to scroll (text or images) just goes between the opening: <marquee> and closing: </marquee> tag pair. For images, use the standard image tag. Here's an example:

This text and the WIZ graphics will scroll right to left and then repeat...& And here's the code:

<marquee><img src="http://www.ambassadorboard.net/graphics/wizsig.gif" border="0" align="absmiddle"> <b>This text and the WIZ graphics will scroll right to left and then repeat...&amp;</b> <img src="http://www.ambassadorboard.net/graphics/wizsig.gif" border="0" align="absmiddle"></marquee>

There are a number of attributes that will change how the MARQUEE tag works. Here's a complete chart of them:

attributes Description
BEHAVIOR Specifies how the marquee should scroll. Valid values are: "scroll", "alternate", or "slide." The default value is "scroll."
DIRECTION  Specifies the direction the marquee should scroll. Valid values are: "left", "right", "up", and "down." The default value is "right."
WIDTH  Specifies the width of the marquee, in pixel or % units.
HEIGHT  Specifies the height of the marquee, in pixel or % units.
SCROLLAMOUNT  Specifies the amount in pixels the marquee should scroll each time it's redrawn (see scrollDelay). The default value is "6".
SCROLLDELAY  Specifies the amount in milliseconds between times the marquee is redrawn. Default value is "85".
TRUESPEED  Specifies whether the marquee should catch up with any skipped cycles. The default value is "false."
LOOP  Specifies the number of times the marquee should repeat itself when it reaches the end of the message. The default value is "infinite."

It's always the right time to use good code!

[ back | top ]

design by wizard_mithrandir
Copyright © 2002, 2008, by Stephen B. Henry