Home > Abakada: Back to Basics > Language References > HTML Elements > MARQUEE Element
Creates a scrolling text marquee. | HTML 5 |
HTML Syntax
<marquee
behavior = alternate | scroll | slide
bgcolor = color
class = classname
datafld = colname
dataformatas = html | text
datasrc = #id
dir = ltr | rtl
direction = down | left | right | up
height = n
hspace = n
id = value
loop = n
scrollamount = n
scrolldelay = milliseconds
style = css_style_rules
title = text
truespeed
vspace = n
width = n
>
The width of the MARQUEE object defaults to 100 percent. When a MARQUEE is in a TD that does not specify a width, you should explicitly set the width of MARQUEE. If neither the MARQUEE nor the TD has a width specified, the marquee will be collapsed to a 1-pixel width.
When a MARQUEE object is scrolling vertically its scrollLeft property is set to zero, and when it is scrolling horizonally, its scrollTop property is set to zero, overriding any script setting.
NOTE: Both start and end tags are required.
NOTE: This element has been deprecated and is no longer recommended.
The <marquee>
element has no attribute of its own, but supports global attributes common to all HTML elements.
The MARQUEE in this example will scroll from left to right across the screen. It will move 10 pixels every 100 milliseconds.
<marquee direction=right behavior=scroll scrollamount=10 scrolldelay=100>
<h3>This is a scrolling marquee<h3>.
</marquee>