How To Create HTML Documents
(Hypertext Markup Language)


Page 8



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 scrolling text marquee (as the name suggests, a scrolling text region much like the Windows Marquee screen saver). Marquees can be left- or right-aligned, like images and have a variety of attributes to control them.

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

BEHAVIOR
This can be set to SCROLL, SLIDE or ALTERNATE. It specifies how the text should behave. SCROLL (the default) means start completely off one side, scroll all the way across and completely off, then start again. SLIDE means start completely off on side, scroll in and stop as soon as the text touches the other margin. ALTERNATE means bounce back and forth within the marquee.

BGCOLOR
This specifies a background colour for the marquee, either as a rrggbb hex triplet, or as one of the Internet Explorer prenamed colours. (See for more information)

DIRECTION
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
This specifies the height of the marquee, either in pixels (HEIGHT=n) or as a percentage of the screen height (HEIGHT=n%).

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

HSPACE
This specifies left and right margins for the outside of the marquee, in pixels.

LOOP
LOOP specifies how many times a marquee will loop when activated. If n=-1, or LOOP=INFINITE is specifies, the marquee will loop indefinitely.

SCROLLAMOUNT
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
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.

VSPACE
VSPACE specifies the top and bottom margins for the outside of the marquee, in pixels.

Examples:

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

This text will scroll from left to right slowly


<MARQUEE BEHAVIOR=SLIDE>This marquee will scroll in and "stick."</MARQUEE>

This marquee will scroll in and "stick."


<MARQUEE HEIGHT=50% WIDTH=80%>This marquee, is half the height of the screen and 80% of the screen width.</MARQUEE>

This marquee, is half the height of the screen and 80% of the screen width.


<MARQUEE SCROLLDELAY=5 SCROLLAMOUNT=50>This is a very fast marquee.</MARQUEE>

This is a very fast marquee.


Back To First Page       Return to Main page