NOTICE: This website is no longer updated or supported - as such many of the techniques used to build it may seem antiquated in the modern day. It is preserved for historical reasons only.

HTML XHTML The Complete Reference
home » reference » appendix a » html element reference

<marquee> (Marquee Display)


This proprietary element specifies a scrolling, sliding, or bouncing text marquee.

Proprietary Syntax (Defined by Internet Explorer)


<marquee
accesskey="key"(5.5)
behavior="alternate | scroll | slide"(3)
bgcolor="color name | #RRGGBB"(3)
class="class name(s)"(4)
contenteditable="false | true | inherit"(5.5)
datafld="column name"(4)
dataformatas="html | text"(4)
datasrc="data source id"(4)
direction="down | left | right | up"(3)
dir="ltr | rtl"(5.0)
height="pixels or percentage"
hidefocus="true | false"(5.5)
hspace="pixels"(3)
id="unique alphanumeric identifier"(4)
lang="language code"(4)
language="javascript | jscript | vbs | vbscript"(4)
loop="infinite | number"(3)
scrollamount="pixels"(3)
scrolldelay="milliseconds"(3)
style="style information"(4)
tabindex="number"(5.5)
title="advisory text"(4)
truespeed="false | true"(4)
unselectable="on | off"(5.5)
vspace="pixels"(3)
width="pixels or percentage"(3)>
</marquee>

Events Defined by Internet Explorer


onactivate, onbeforeactivate, onbeforecut, onbeforedeactivate, onbeforeeditfocus, onbeforepaste, onblur, onbounce, onclick, oncontextmenu, oncontrolselect, oncut, ondblclick, ondeactivate, ondrag, ondragend, ondragenter, ondragleave, ondragover, ondragstart, ondrop, onerrorupdate, onfilterchange, onfinish, onfocus, onfocusin, onfocusout, onhelp, onkeydown, onkeypress, onkeyup, onlosecapture, onmousedown, onmouseenter, onmouseleave, onmousemove, onmouseout, onmouseover, onmouseup, onmousewheel, onmove, onmoveend, onmovestart, onpaste, onpropertychange, onreadystatechange, onresize, onresizeend, onresizestart, onscroll, onselectstart, onstart, ontimeerror

Element Specific Attributes


behavior
This attribute controls the movement of marquee text across the marquee. The alternate option causes text to completely cross the marquee field in one direction and then cross in the opposite direction. A value of scroll for the attribute causes text to wrap around and start over again. This is the default value for a marquee. A value of slide for this attribute causes text to cross the marquee field and stop when its leading character reaches the opposite side.

bgcolor
This attribute specifies the marquee's background color. The value for the attribute can either be a color name or a color value defined in the hexadecimal #RRGGBB format.

datafld
This attribute is used to indicate the column name in the data source that is bound to the marquee element.

dataformatas
This attribute indicates whether the bound data is plain text (text) or HTML (html). The data bound with marquee is used to set the message that is scrolled.

datasrc
The value of this attribute is set to an identifier indicating the data source from which data is to be pulled. Bound data is used to set the message that is scrolled in the marquee.

direction
This attribute specifies the direction in which the marquee should scroll. The default is left. Other possible values for direction include down, right, and up.

height
This attribute specifies the height of the marquee in pixels or as a percentage of the window.

hspace
This attribute indicates the horizontal space in pixels between the marquee and surrounding content.

loop
This attribute indicates the number of times the marquee content should loop. By default, a marquee loops infinitely unless the behavior attribute is set to slide. It also is possible to use a value of infinite or -1 to set the text to loop indefinitely

scrollamount
This attribute specifies the width in pixels between successive displays of the scrolling text in the marquee.

scrolldelay
This attribute specifies the delay in milliseconds between successive displays of the text in the marquee.

truespeed
When this attribute is present, it indicates that the scrolldelay value should be honored for its exact value. If the attribute is not present, any values less than 60 are rounded up to 60 milliseconds.

vspace
This attribute indicates the vertical space in pixels between the marquee and surrounding content.

width
This attribute specifies the width of the marquee in pixels or as a percentage of the enclosing window.

Examples


<marquee behavior="alternate">
SPECIAL VALUE !!! This week only !!!
</marquee>

<marquee id="marquee1" bgcolor="red" direction="right" height="30"
width="80%" hspace="10" vspace="10">

The super scroller scrolls again!!
More fun than a barrel of &lt;blink&gt; elements.
</marquee>

Compatibility


No Standards
Internet Explorer 3, 4, 5, 5.5, 6
Limited functionality in Netscape 6, 7

Notes


This is primarily a Microsoft-specific element, although a few other browsers, notably MSNTV and later Netscape and Mozilla versions, support it to some degree.

(X)HTML Elements
CSS Properties
Previous: map Next: menu
< Home | About | Chapters | Examples | Errata | Reference | Site Map >