<MARQUEE>NN n/a   IE 3   HTML n/a
<MARQUEE>...</MARQUEE>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
IE [window.]document.all.elementID
BEHAVIORNN n/a   IE 3   HTML n/a
BEHAVIOR="motionType"Optional
 

Sets the motion of the content within the rectangular space set aside 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:
alternate Content alternates between marching left and right.
scroll Content scrolls (according to the DIRECTION attribute) into view and out of view before starting again.
slide Content scrolls (according to the DIRECTION attribute) into view, stops at the end of its run, blanks, and then starts again.
 
Default scroll
 
Object Model Reference
IE [window.]document.all.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).
 
Default Varies with browser, browser version, and operating system.
 
Object Model Reference
IE [window.]document.all.elementID.bgColor
DATAFLDNN n/a   IE 4   HTML n/a
DATAFLD="columnName"Optional
 

Used with IE 4 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.

 
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 [window.]document.all.elementID.dataFld
DATAFORMATASNN n/a   IE 4   HTML n/a
DATAFORMATAS="dataType"Optional
 

Used with IE 4 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.

 
Example
<MARQUEE BEHAVIOR="slide" DIRECTION="left" WIDTH=200 
DATASRC="#DBSRC3" DATAFLD="news" DATAFORMATAS="HTML">
...
</MARQUEE>
 
Value
IE 4 recognizes two possible settings: text | HTML.
 
Default text
 
Object Model Reference
IE [window.]document.all.elementID.dataFormatAs
DATASRCNN n/a   IE 4   HTML n/a
DATASRC="dataSourceName"Optional
 

Used with IE 4 data binding to specify the name of the remote ODBC data source (such as an Oracle or SQL Server database) to be associated with the element. Content from the data source is specified via the DATAFLD attribute.

 
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 [window.]document.all.elementID.dataSrc
DIRECTIONNN n/a   IE 4   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
IE [window.]document.all.elementID.direction
HEIGHT, WIDTHNN n/a   IE 4   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 1000f 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
IE [window.]document.all.elementID.height
[window.]document.all.elementID.width
HSPACE, VSPACENN n/a   IE 4   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 alternate, 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
IE [window.]document.all.elementID.hspace
[window.]document.all.elementID.vspace
LOOPNN n/a   IE 4   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
IE [window.]document.all.elementID.loop
SCROLLAMOUNTNN n/a   IE 4   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
IE [window.]document.all.elementID.scrollAmount
SCROLLDELAYNN n/a   IE 4   HTML n/a
SCROLLDELAY="milliseconds"Optional
 

Apparent scrolling speed can be influenced by the frequency of 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
IE [window.]document.all.elementID.scrollDelay
TRUESPEEDNN n/a   IE 4   HTML n/a
TRUESPEEDOptional
 

The MARQUEE element includes a built-in speed bump to prevent scrolling from being accidentally specified 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
IE [window.]document.all.elementID.trueSpeed
Hosted by uCoz