Hide About ...

HTML for marquees and scrolling scripts

Everything you need to script scrollers, marquees and other tools for web developers. You can generate a simple marquee or a more advanced one using our marquee generator script.

Learn how to use the behavior and direction tag, as well as how to change the speed of scrolling in your HTML Marquees.

Marquee attributes

Syntax

<MARQUEE>

BEHAVIOR="ALTERNATE | SCROLL | SLIDE"
BGCOLOR="color name | #RRGGBB"
CLASS="class name(s)"
DATAFLD="column name"
DATAFORMATS="HTML | TEXT"
DATASRC="data source ID"
DIRECTION="DOWN | LEFT | RIGHT | UP"
HEIGHT="pixels or percentage"
HSPACE="pixels"
ID="unique alphanumeric identifier"
LANGUAGE="JAVASCRIPT | JSCRIPT | VBS | VBSCRIPT"
LOOP="INFINITE | number"
SCROLLAMOUNT="pixels"
SCROLLDELAY="milliseconds"
STYLE="style information"
TITLE="advisory text"
TRUESPEED
VSPACE="pixels"
WIDTH="pixels or percentage"

Event Handlers (for JavaScript)
onafterupdate="script"
onblur="script"
onbounce="script"
onclick="script"
ondblclick="script"
ondragstart="script"
onfinish="script"
onfocus="script"
onkeydown="script"
onkeypress="script"
onkeyup="script"
onmousedown="script"
onmousemove="script"
onmouseout="script"
onmouseover="script"
onmouseup="script"
onresize="script"
onrowenter="script"
onrowexit="script"
onselectstart="script"
onstart="script">

</MARQUEE>

Attributes

BEHAVIOR
This attribute controls the movement of marquee text. The ALTERNATE option causes the text to go back and forth. A value of SCROLL for the attribute causes text to wrap around and start over again - this is the default marquee you are used to. A value of SLIDE for this attribute causes text to slide into position and stop moving.

BGCOLOR
This attribute specifies the marquee's background color. The value for the attribute can either be a color name or a hexidecimal color value.

CLASS
This attribute is set to indicate the class or classes that a particular element belongs to as defined in your stylesheet.

DATAFLD
This attribute is used to indicate the specific column name in the data source that is bound to the <MARQUEE> element.

DATAFORMATS
This attribute indicates if the bound data is plain text or 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 to pull data from. Bound data is used to set the message that is scrolled in the <MARQUEE>.

DIRECTION
This attribute specifies the direction the marquee should scroll. The default is LEFT. Other possible values for DIRECTION include DOWN, RIGHT, and UP.

HEIGHT
The height 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.

ID
This attribute specifies a unique alphanumeric identifier to be associated with an element. Naming an element is important to being able to access it with a style sheet, a link, or a scripting language.

LANGUAGE
A Microsoft attribute that specifies the script language to be used with an associated script bound to the element, typically through an event handler attribute. Possible values may include JAVASCRIPT, JSCRIPT, VBS, and VBSCRIPT.

LOOP
This attribute indicates the number of times the marquee text should loop. By default, a marquee loops infinitely unless the BEHAVIOR attribute is set to SLIDE. It is also 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. The higher the number, the faster the scroll.

SCROLLDELAY
This attribute specifies the delay in milliseconds between successive displays of the text in the marquee. The lower the number, the faster the scroll.

STYLE
This attribute specifies an inline style associated with the element. The style information is used to determine the rendering of the affected element. A stylesheet value will override this value.

TITLE
This attribute is simply a tool tip that is visible when the cursor (mouse) is over the element. A title may also provide information that alerts future document maintainers to the meaning of the element and its enclosed content.

TRANSPARENCY
This attribute specifies the marquee's degree of transparency. Values range from 0 (totally opaque) to 100 (totally transparent).

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 soecifies the width of the marquee in pixels or as a percentage of the enclosing window.

Event Handlers

onafterupdate
Executes after the transfer of data from the element to data provider, namely, a data update.

onblur
Occurs when an element loses focus, meaning that the user has moved focus to another element, typically either by clicking the mouse on it or tabbing to it.

onbounce
Triggered when the bouncing contents of a marquee touch one side or another.

onclick
Indicates that the element has been clicked.

ondblclick
Indicates that the element has been double-clicked.

ondragstart
Fires when the user begins to drag a highlighted selection.

onfinish
Triggered when a looping marquee finished.

onfocus
The focus event describes when an element has received focus, namely, it has been selected for manipulation or data entry.

onkeydown
Indicates that a key is being pressed down with focus on the element.

onkeypress
Describes the event of a key being pressed and released with focus on the element.

onkeyup
Indicates that s key is being released with focus on the element.

onmousedown
Indicates the press of a mouse button with focus on the element.

onmousemove
Indicates that the mouse has moved while over the element.

onmouseout
Indicates that the mouse has moved away from an element.

onmouseover
Indicates that the mouse has moved over an element.

onmouseup
Indicates the release of a mouse button with focus on the element.

onresize
Fires whenever an object is resized. Can only be bound to the window under Netscape as set via the <BODY> element.

onrowenter
Indicates that a bound data row has changed and new data values are available.

onrowexit
Launches just prior to a bound data source control changing the current row.

onselectstart
Functions when the user begins to select information by highlighting.

onstart
Fires when a looped marquee begins or starts over.


Go Daddy $7.49 .com Sale 125x125 SSL Certs Free trial

Quick Blog from GoDaddy.com Get your blog up and running fast!

Find, Buy & Sell Domain Names Make money selling domains from your site/blog.

Low cost domain registration. Buy one domain, get one free!

#1 GoDaddy.com - Home of the $1.99 domain name

Click Here for CoffeeCup Website Design Software

Image Scroller Marquee



HTML scroller with pause and background color change on mouseover. Uses no javascript.

>>>Get this script


JavaScript Scroller

>>>Get this script


Easy JavaScript Scroller

>>>Get this script