Marquee Tag In HTML

Marquee Tag In HTML

<MARQUEE> Tag


HTML provides a special feature to display scrolling and animated text in the Web page. This tag is supported by Internet Explorer, Firefox and Netscape 7 and above. Netscape has a blink tag to display blinking text but Internet Explorer does not support blink tag.

Marquee tag can be used to scroll text or image in different directions. The text placed inside the marquee tag scrolls horizontally across the screen or the web page. The scrolling text is normally used to give messages or display some special announcements to the visitors.

Attributes

BEHAVIOR

It indicates how the contents will scroll. The possible values are scroll, slide and alternate. The scroll value is the default value.It indicates that the content scrolls off the edge of marquee area and then reappears on the other side. The slide value is almost the same. It also indicates that when the content reaches the left edge, it stops without scrolling off. The alternate value makes the content bounce back and forth. All contents remain visible all the time.

BGCOLOR

It is used to set the background color of the marquee. Its value can given as a combination of red, green and blue or name of the color. The hexadecimal value of the color can also be used.

DIRECTION

It indicates the direction to which the marquee wil scroll. The possible values are up, down, left and right. The default value is left. The left value indicates that the marquee starts at the right and moves to left across the page. The right value indicates that the marquee starts at the left and moves to right across the page.

HEIGHT

It defines the height of marquee. It is given in pixels or percentage.

HSPACE

It is used to set the horizontal space to the left and right of the marquee. Its value is given in pixels.

LOOP

It specifies the number of times the marquee will scroll. The default value is INFINITE.

SCROLLDELAY

It is used together with SCROLLAMOUNT to set the speed of the scrolling. Marquee moves the content by displaying the content and then delays for some period of time specified in SCROLLDELAY. Its value is given in milliseconds. The default delay is 85.

SCROLLAMOUNT

It is used together with SCROLLDELAY to set the speed of the scrolling. Marquee moves the content by displaying the content and delays for some period of time. It then displays the content in a new position specified in SCROLLAMOUNT that sets the size in pixels of each jump. A higher value for SCROLLAMOUNT makes the marquee scroll faster. The default value is 6.

WIDTH

It defines the width of marquee. It is given in pixels.

VSPACE

It is used to set the vertical space at the top and bottom of the marquee. It is given in pixels.

Example

<MARQUEE> Marquee </MARQUEE>
<MARQUEE LOOP=2>Hello</MARQUEE>