NOTE : This element is currently only supported by the Microsoft Internet Explorer. For authors writing specifically for Netscape, a marquee effect can be obtained through the use of a Java applet, JavaScript script, or by using a multi-block GIF 'banner' (these can be constructed using the GIF construction kit).

The <MARQUEE> element allows the author to create a region of text that can be made to scroll across the screen (much like the Windows Marquee screen saver)

E.g. :

<MARQUEE>This text will scroll from right to left slowly</MARQUEE>

appears thus:

This text will scroll from right to left slowly

NOTE : If you are not viewing this page with Internet Explorer then the example <MARQUEE>s will not display properly.

Marquees can be aligned to the left or right hand side in the HTML document and have a variety of attributes to control them.

ALIGN="left|right|top|middle|bottom"
This attribute can be set to either LEFT, RIGHT, TOP, MIDDLE or BOTTOM and specifies that the text around the marquee should align with the top, middle , or bottom of the marquee.

For example:

<MARQUEE ALIGN=TOP>Hello in browser land.</MARQUEE>Welcome to this page

The text "Welcome to this page'" would be aligned with the top of the Marquee (which scrolls the text "Hello in browser land" across the screen. (NOTE : Until the Marquee width is limited by setting the WIDTH attribute, then the Marquee will occupy the whole width of the browser window and any following text will be rendered below the Marquee.)

BEHAVIOR="scroll|slide|alternate"
This can be set to SCROLL, SLIDE or ALTERNATE. It specifies how the text displayed in the Marquee should behave. SCROLL (the default) makes the Marquee test start completely off one side of the browser window, scroll all the way across and completely off the opposite side, then start again. SLIDE causes the text to scroll in from one side of the browser window, then stick at the end of its scroll cycle. ALTERNATE means bounce back and forth within the marquee.

E.g.

<MARQUEE BEHAVIOR=ALTERNATE>
This marquee will "bounce" across the screen</MARQUEE>

will appear thus :
This marquee will "bounce" across the screen

BGCOLOR="#rrggbb|colour name"
This specifies a background colour for the marquee, either as a rrggbb hex triplet, or as one of the pre-named colours. (See <BODY BGCOLOR> for more information)

E.g.

<MARQUEE BGCOLOR="#F0F8FF">Nice Background colour!<MARQUEE>

will appear thus :
Nice Background colour!

DIRECTION="left|right"
This specifies in which direction the text should scroll. The default is LEFT, which means scrolling to the left from the right. This attribute can also be set to RIGHT, which would cause the marquee to scroll from the left to the right.

HEIGHT="value|value%"
This specifies the height of the marquee, either in pixels (HEIGHT=n) or as a percentage of the screen height (HEIGHT=n%).

WIDTH="value|value%"
This specifies the width of the marquee, either in pixels (WIDTH=n) or as a percentage of the screen height (WIDTH=n%).

HSPACE="value"
This attribute is the same as that for images. It is used to specify the number of pixels of free space at the left and right hand sides of the <MARQUEE> so that text that flows around the <MARQUEE> doesn't push up against the sides.

LOOP="value|-1|infinite"
LOOP=n specifies how many times a marquee will loop when activated. If n=-1, or LOOP=INFINITE is specified, the marquee action will loop indefinitely. NOTE : By default, <MARQUEE...>'s will loop indefinitely.

SCROLLAMOUNT="value"
Specifies the number of pixels between each successive draw of the marquee text. That is, the amount for the text to move between each draw.

SCROLLDELAY="value"
SCROLLDELAY specifies the number of milliseconds between each successive draw of the marquee text. That is, it controls the speed at which text draw takes place.

For example :

<MARQUEE SCROLLDELAY=1 SCROLLAMOUNT=75>I'm fast</MARQUEE>

would render thus

I'm fast

VSPACE="value"
This attribute is the same as that for images. It is used to specify the number of pixels of free space at the top and bottom of the <MARQUEE> so that text that flows around the <MARQUEE> doesn't push up against the top or bottom.

NOTE :If you wish to set the <FONT> to be displayed in the <MARQUEE>, then the <FONT> declaration needs to be outside the <MARQUEE>

E.g.

<FONT FACE="Comic Sans MS"><MARQUEE>Hello</MARQUEE>

will appear thus:
Hello

<MARQUEE> can also take the CLASS, ID and STYLE attributes to allow style sheet definitions to be applied to it. For more details of these attributes, see the Style Sheets topic.


<LISTING> Block Formatting Elements Overview <MULTICOL>