HTML - <marquee>

The HTML <marquee> element is used to insert a scrolling area of text.

Example

 

HTML
<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>

Description  

The HTML <marquee> element is used to insert a scrolling area of text.

Browser Compatibility  

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 1.0 1.0 (1.7 or earlier) 2.0 7.2 1.2
truespeed attribute No support 3.0 (1.9) 4.0 No support No support
hspace/vspace attribute ? 3.0 (1.9) ? ? ?
loop attribute ? 3.0 (1.9) ? ? ?
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support ? 1.0 (1.0) ? ? ?
truespeed attribute ? 1.0 (1.0) ? ? ?
hspace/vspace attribute ? 1.0 (1.0) ? ? ?
loop attribute ? 1.0 (1.0) ? ? ?

Specifications  

Specification Status Comment
WHATWG HTML Living Standard
The definition of '<marquee>' in that specification.
Living Standard Make it obsolete in favor of CSS but define its expected behavior, for backward compatibility.
HTML5
The definition of '<marquee>' in that specification.
Recommendation Make it obsolete in favor of CSS but define its expected behavior, for backward compatibility.

Event handlers

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

start
Starts scrolling of the marquee.
stop
Stops scrolling of the marquee.

License

© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-us/docs/web/html/element/marquee

Element HTML Obsolete Reference Web