HTML <marquee> (Marquee Display) Tag
Deprecated: Not Supported in HTML5.
Example
<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
</marquee>
</marquee>
Meaning
The <marquee> specifies a scrolling, sliding, or bouncing text marquee.
Standard Syntax
<marquee>...</marquee>
Browser Support
Status
Attributes
Attribute | Value | Description |
---|---|---|
behavior | scroll slide alternate. |
Specifies the text is scrolled within the marquee. |
bgcolor | color | Specifies the background color through color name or hexadecimal value. |
direction | left right up down |
Specifies the direction of the scrolling within the marquee. |
height | pixels percentage |
Specifies the height of marquee. |
hspace | pixels percentage |
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 percentage |
Sets the vertical margin in pixels or percentage value. |
width | pixels percentage |
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
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.