HTML and CSS Reference
In-Depth Information
then cross in the opposite direction. A value of
scroll
for the attribute causes text to wrap
around and start over again. This is the default value for a marquee. A value of
slide
for
this attribute causes text to cross the marquee field and stop when its leading character
reaches the opposite side.
bgcolor
This attribute specifies the marquee's background color. The value for the attribute
can either be a color name or a color value defined in the hexadecimal
#RRGGBB
format.
direction
This attribute specifies the direction in which the marquee should scroll. The
default is
left
. Other possible values for
direction
include
down
,
right
, and
up
.
loop
This attribute indicates the number of times the
marquee
content should loop. By
default, a marquee loops infinitely unless the
behavior
attribute is set to
slide
. It also is
possible to use a value of
infinite
or
−1
to set the text to loop indefinitely.
scrollamount
This attribute specifies the width, in pixels, between successive displays of
the scrolling text in the
marquee
.
scrolldelay
This attribute specifies the delay, in milliseconds, between successive displays
of the text in the marquee.
truespeed
When this attribute is present, it indicates that the
scrolldelay
value should
be honored for its exact value. If the attribute is not present, any value less than 60 is
rounded up to 60 milliseconds.
Examples
<marquee behavior="alternate">
SPECIAL VALUE !!! This week only !!!
</marquee>
<marquee id="marquee1" bgcolor="red" direction="right" height="30"
width="80%" hspace="10" vspace="10">
The super scroller scrolls again!!
More fun than a barrel of <BLINK> elements.
</marquee>
Compatibility
No standards support Firefox 1+, Internet Explorer 3+, Netscape 6+, Opera 7+, Safari 1+
Notes
• This is primarily a Microsoft-specific element, although most browsers support it to
some degree. Do not expect all events and attributes beyond basic animation to be
supported consistently or even at all beyond Internet Explorer.
• There is a placeholder in the current HTML5 specification that discusses this
element will be found in browsers, so its future is still unclear.