<MARQUEE>NN n/a IE 3 HTML n/a  

<MARQUEE>...</MARQUEE>

HTML End Tag: Optional  

The marquee element is unique to Internet Explorer. It displays HTML content in a scrolling region on the page. Scrolled content goes between the start and end tags. There is no corresponding element in Navigator, although the effect can be duplicated in a cross-browser fashion with a Java applet or more cumbersomely through Dynamic HTML.

 
Example
 
<MARQUEE behavior="slide" direction="left" width="250" bgcolor="white">
Check out our monthly specials.
</MARQUEE>
 
Object Model Reference
 
[window.]document.getElementById(elementID)
 
Element-Specific Attributes
 
behaviorbgcolordataflddataformatasdatasrc
directionheighthspaceloopscrollamount
scrolldelaytruespeedvspacewidth
 
Element-Specific Event Handler Attributes
 
HandlerNNIEHTML
onafterupdaten/a4n/a
onbouncen/a4n/a
onfinishn/a4n/a
onstartn/a4n/a
behaviorNN n/a IE 3 HTML n/a  

behavior="motionType"

Optional  

Sets the motion of the content within the rectangular space reserved for the marquee element. You have a choice of three motion types.

 
Example
 
<MARQUEE behavior="slide" direction="left" width="250" bgcolor="white">
...</MARQUEE>
 
Value

One of the case-insensitive marquee element motion types:

 
Default

scroll

 
Object Model Reference
 
[window.]document.getElementById(elementID).behavior
bgcolorNN n/a IE 3 HTML n/a  

bgcolor="colorTripletOrName"

Optional  

Establishes a fill color (behind the text and other content) for the rectangular space reserved for the marquee element.

 
Example
 
<MARQUEE behavior="slide" direction="left" width="250" bgcolor="white">
...</MARQUEE>
 
Value

A hexadecimal triplet or plain-language color name. A setting of empty is interpreted as "#000000" (black). See Appendix A for acceptable plain-language color names.

 
Default

Varies with browser, browser version, and operating system.

 
Object Model Reference
 
[window.]document.getElementById(elementID).bgColor
datafldNN n/a IE 4 HTML n/a  

datafld="columnName"

Optional  

Used with IE data binding to associate a remote data source column name with the content scrolled by the marquee element. The data source column must be either plain text or HTML (see dataformatas). A datasrc attribute must also be set for the marquee element. Works only with text file data sources in IE 5/Mac.

 
Example
 
<MARQUEE behavior="slide" direction="left" width="200"
datasrc="DBSRC3" datafld="news" dataformatas="HTML"></MARQUEE>
 
Value

Case-sensitive identifier.

 
Default

None.

 
Object Model Reference
 
IE
dataformatasNN n/a IE 4 HTML n/a  

dataformatas="dataType"

Optional  

Used with IE data binding, this attribute advises the browser whether the source material arriving from the data source is to be treated as plain text or as tagged HTML. This attribute setting depends entirely on how the data source is constructed. Works only with text file data sources in IE 5/Mac.

 
Example
 
<MARQUEE behavior="slide" direction="left" width=200
datasrc="DBSRC3" datafld="news" dataformatas="HTML"></MARQUEE>
 
Value

Constant values: text | html.

 
Default

text

 
Object Model Reference
 
[window.]document.getElementById(elementID).dataFormatAs
datasrcNN n/a IE 4 HTML n/a  

datasrc="dataSourceName"

Optional  

Used with IE data binding, this attribute advises the browser whether the source material arriving from the data source is to be treated as plain text or as tagged HTML. Works only with text file data sources in IE 5/Mac.

 
Example
 
<MARQUEE behavior="slide" direction="left" width="200"
datasrc="DBSRC3" datafld="news" dataformatas="HTML"></MARQUEE>
 
Value

Case-sensitive identifier.

 
Default

None.

 
Object Model Reference
 
[window.]document.getElementById(elementID).dataSrc
directionNN n/a IE 3 HTML n/a  

direction="scrollDirection"

Optional  

A marquee element's content may scroll in one of four directions. For optimum readability in languages written left to right, it is easier to grasp the content when it scrolls either to the left or downward.

 
Example
 
<MARQUEE behavior="slide" direction="left" width="200">...</MARQUEE>
 
Value

Four possible directions: down | left | right | up.

 
Default

left

 
Object Model Reference
 
[window.]document.getElementById(elementID).direction
height, widthNN n/a IE 3 HTML n/a  

height="length" width="length"

Optional  

A marquee element renders itself as a rectangular space on the page. You can override the default size of this rectangle by assigning values to the height and width attributes. The default value for height is determined by the font size of the largest font assigned to content in the marquee. Default width is set to 100% of the width of the next outermost container (usually the document body). The width defines how much space is used at one time or another by horizontally scrolling content. When the marquee is embedded within a td element that lets the browser determine the table cell's calculated width, you must set the width of the marquee element or risk having the browser set it to 1, making the content unreadable.

If you want extra padding around the space, see the hspace and vspace attributes.

 
Example
 
<MARQUEE behavior="slide" direction="left" height="20" width="200">
...
</MARQUEE>
 
Value

Any length value in pixels or percentage of available space.

 
Default

A width of 100%; a height of 12 pixels.

 
Object Model Reference
 
[window.]document.getElementById(elementID).height
[window.]document.getElementById(elementID).width
hspace, vspaceNN n/a IE 3 HTML n/a  

hspace="pixelCount" vspace="pixelCount"

Optional  

Internet Explorer provides attributes for setting padding around a marquee element. The hspace attribute controls padding along the left and right edges (horizontal padding), whereas the vspace attribute controls padding along the top and bottom edges (vertical padding). Adding such padding provides an empty cushion around the marquee's rectangle. As an alternative, you can specify the various margin style sheet settings, especially if you want to open space along only one edge.

 
Example
 
<MARQUEE behavior="slide" direction="left" height="20" width="200"
hspace="10" vspace="15">...</MARQUEE>
 
Value

Any positive integer.

 
Default

0

 
Object Model Reference
 
[window.]document.getElementById(elementID).hspace
[window.]document.getElementById(elementID).vspace
langNN 3 IE 4 HTML 4  

lang="languageCode"

Optional  

The language being used for the element's attribute values and content. A browser can use this information to assist in proper rendering of content with respect to details such as treatment of ligatures (when supported by a particular font or required by a written language), quotation marks, and hyphenation. Other applications and search engines might use this information to aid the selection of spell-checking dictionaries and the creation of indices.

 
Example
 
<SPAN lang="de">Deutsche Bundesbahn</SPAN>
 
Value

Case-insensitive language code.

 
Default

Browser default.

 
Object Model Reference
 
[window.]document.getElementById(elementID).lang
loopNN n/a IE 3 HTML n/a  

loop="count"

Optional  

Sets the number of times the marquee element scrolls its content. After the final scroll, the content remains in a fixed position. Constant animation can sometimes be distracting to page visitors, so if you have the marquee turn itself off after a few scrolls, you may be doing your visitors a favor.

 
Example
 
<MARQUEE behavior="slide" direction="left" height="20" width="200" loop="3">
...</MARQUEE>
 
Value

Any positive integer if you want the scrolling to stop. Otherwise, set the value to -1 or infinite.

 
Default

-1

 
Object Model Reference
 
[window.]document.getElementById(elementID).loop
scrollamountNN n/a IE 3 HTML n/a  

scrollamount="pixelCount"

Optional  

marquee content looks animated by virtue of the browser clearing and redrawing its content at a location offset from the previous location (in a direction set by the direction attribute). You can make the scrolling appear faster by increasing the amount of space between positions of each drawing of the content; conversely, you can slow down the scrolling by decreasing the space. See also scrolldelay.

 
Example
 
<MARQUEE behavior="slide" direction="left" height="20" width="200" scrollamount="2">
...</MARQUEE>
 
Value

Any positive integer.

 
Default

6

 
Object Model Reference
 
[window.]document.getElementById(elementID).scrollAmount
scrolldelayNN n/a IE 3 HTML n/a  

scrolldelay="milliseconds"

Optional  

Apparent scrolling speed can be influenced by the frequency of the redrawing of the content as its position shifts with each redraw (see scrollamount). Increasing the scrolldelay value slows down the scroll speed, whereas decreasing the value makes the scrolling go faster. Be aware that on slower computers, you can reach a value at which no increase of speed is discernible no matter how small you make the scrolldelay value (see truespeed).

 
Example
 
<MARQUEE behavior="slide" direction="left" height="20" width="200" scrolldelay="100">
...</MARQUEE>
 
Value

Any positive integer representing the number of milliseconds between content redraws.

 
Default

85 (Windows 95); 90 (Macintosh).

 
Object Model Reference
 
[window.]document.getElementById(elementID).scrollDelay
truespeedNN n/a IE 4 HTML n/a  

truespeed

Optional  

The marquee element includes a built-in speed bump to prevent scrolling from being accidentally specified as too fast for visitors to read. If you genuinely intend the content to scroll very fast, you can include the truespeed attribute to tell the browser to honor scrolldelay settings below 60 milliseconds.

 
Example
 
<MARQUEE behavior="slide" direction="left" height="20" width="200"
scrolldelay="45" truespeed>...</MARQUEE>
 
Value

The presence of this attribute sets the value to true.

 
Default

false

 
Object Model Reference
 
[window.]document.getElementById(elementID).trueSpeed
vspace  

  

See hspace.

width  

  

See height.