behavior (HTML attribute)

Spec
Depr. Version
No N/A
Browser support (more…)
IE5.5+ FF1+ SA1.3+ OP9.2+ CH2+
Full Full Full Full Full

Syntax

behavior="
{ scroll | slide | alternate }
"

Description

The default behavior for the marquee is for text to scroll - which means it moves across, then off, the screen then starts the process again at the other side of the screen. You may use the behavior attribute to change that, by using "slide", which causes the text to move across the screen but stop at its destination rather than repeating the process again. If you use the value "alternate", the text will move in one direction then will bounce back and travel in the opposite direction and then repeat the process all over again.

Example

The following text will bounce from left to right:

<p><marquee behavior="alternate">Bouncy bouncy!</marquee></p>

Value

"alternate", "scroll" and "slide".

Compatibility

Internet Explorer Firefox Safari Opera Chrome
5.5 6.0 7.0 8.0 1.0 1.5 2.0 3.0 3.5 1.3 2.0 3.1 4.0 9.2 9.5 10.0 2.0
Full Full Full Full Full Full Full Full Full Full Full Full Full Full Full Full Full

This attribute is not defined by any standard but is well supported nonetheless.

User-contributed notes

There are no comments yet.

Related Products