HTML <marquee> (Marquee Display) Tag

❮ Previous Reference Next ❯

Deprecated: Not Supported in HTML5.


<marquee>This text will scroll from right to left</marquee>

<marquee direction="up">This text will scroll from bottom to top</marquee>

<marquee direction="down" width="250" height="200" behavior="alternate" style="border:solid">
  <marquee behavior="alternate">
    This text will bounce


The <marquee> specifies a scrolling, sliding, or bouncing text marquee.

Standard Syntax


Browser Support



Attribute Value Description
behavior scroll
Specifies the text is scrolled within the marquee.
bgcolor color Specifies the background color through color name or hexadecimal value.
direction left
Specifies the direction of the scrolling within the marquee.
height pixels
Specifies the height of marquee.
hspace pixels
Specifies the horizontal margin
loop number Specifies the number of times the marquee will scroll, the default value is −1, which means the marquee will scroll continuously.
scrollamount pixels Specifies the amount of scrolling at each interval in pixels. The default value is 6.
scrolldelay seconds Specifies the interval between each scroll movement in milliseconds. The default value is 85. Note that any value smaller than 60 is ignored and the value 60 is used instead, unless truespeed is specified.
truespeed seconds By default, scrolldelay values lower than 60 are ignored. If truespeed is present, those values are not ignored.
vspace pixels
Sets the vertical margin in pixels or percentage value.
width pixels
Specifies the width of marquee.

Event handlers

Method Description
onbounce Fires when the marquee has reached the end of its scroll position. It can only fire when the behavior attribute is set to alternate.
onfinish Fires when the marquee has finished the amount of scrolling that is set by the loop attribute. It can only fire when the loop attribute is set to some number that is greater than 0.
onstart Fires when the marquee starts scrolling.


Methods Description
start() Starts scrolling of the marquee.
stop() Stops scrolling of the marquee.

Global Attributes

<marquee> element also supports the Global Attributes in HTML.

Event Attributes

<marquee> element also supports the Event Attributes in HTML.

❮ Previous Reference Next ❯