<MARQUEE>

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)

This code:

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

produces this effect:

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.

This code:

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

produces this effect:

Hello in browser land.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 that 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.

This code:

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

produces this effect::
This marquee will "bounce" across the screen

BGCOLOR="#rrggbb|color name"
This specifies a background colour for the marquee, either as a rrggbb hex triplet, or as one of the pre-named colours.

This code:

<MARQUEE BGCOLOR="#00CCFF">Nice Background color!<MARQUEE>

produces this effect:
Nice Background color!

CLASS="Style Sheet class"
The CLASS attribute is used to specify the <PLAINTEXT> as using a particular style sheet class.

DATAFLD="Data column name"
The DATAFLD attribute can be used to specify a data column name from the Data source (see DATASRC) that the <MARQUEE> is bound to.

DATAFORMATAS="HTML|text"
When the <MARQUEE> element is data-bound, it can accept straight text, or HTML from the data source. The DATAFORMATAS attribute should be set to "TEXT" or "HTML" accordingly. with DATAFORMATAS="HTML", the data provided for the <BUTTON> element is parsed and rendered when it's displayed.

DATASRC="Data source"
The DATASRC attribute can be used to specify a data source that the <BUTTON> is bound to.

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%).

ID="Style Sheet/Scripting identifier"
The ID attribute can be used to either reference a unique style sheet identifier, or to provide a unique name for the <MARQUEE> element for scripting purposes. Any <MARQUEE> element with an ID attribute can be directly manipulated in script by referencing its ID attribute.

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.

LANG="Language identifier"
The LANG attribute can be used to specify what language the <MARQUEE> element is using. It accepts any valid ISO standard language abbreviation (for example "en" for English, "de" for German etc.)

LANGUAGE="Scripting language"
The LANGUAGE attribute can be used to expressly specify which scripting language Internet Explorer 4.0 uses to interpret any scripting information used in the <MARQUEE> element. It can accept values of vbscript, vbs, javascript or jscript. The first two specify the scripting language as Visual Basic Script, the latter two specify it as using Javascript (the default scripting language used if no LANGUAGE attribute is set.

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.

This code:

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

produces this effect:

I'm fast

STYLE="In line styling"
As well as using previously defined style sheet settings, the <MARQUEE> element can have in-line stylings attached to it.

This code:

<MARQUEE STYLE="{font-family:Arial;font-size:8pt}">Macromedia</MARQUEE>

displays the text in an 8pt Arial font:
Macromedia

TITLE="Informational ToolTip"
The Internet Explorer 4.0 (and above) specific TITLE attribute is used for informational purposes. If present, the value of the TITLE attribute is presented as a ToolTip when the users mouse hovers over the <MARQUEE> section.

TRUESPEED="Speed flag"
With the TRUESPEED flag set, all SCROLLDELAY values are used as specified. If the TRUESPEED flag is not set, then any values of SCROLLDELAY of less than 59 mS are rounded to 60mS.

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.

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%).

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

This code:

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

produces this effect:
Hello