Saturday, 21 July 2012

Marquee Codes


Scrolling Text

Right to Left

To make your text scroll left (i.e. from right to left), use behavior="scroll" and direction="left". Like this:
Source CodeResult
Here is some scrolling text... right to left!

Left to Right

To make your text scroll right (i.e. from left to right), use behavior="scroll" and direction="right". Like this:
Source CodeResult
Here is some scrolling text... left to right!

Scroll Up

To make your text scroll up (i.e. from bottom to top), use behavior="scroll" and direction="up". Like this:
Source CodeResult
Here is some scrolling text... going up!

Scroll Down

To make your text scroll down (i.e. from top to bottom), use behavior="scroll" and direction="down". Like this:
Source CodeResult
Here is some scrolling text... going down!

Speed

You can change the scrolling speed of your marquee. For example, scrollamount="1" sets the marquee to a very slow scroll, while scrollamount="20" will make it faster. You can use whatever number you like though. Like this:
Source CodeResult
Very slow...Faster...Fast...Lightning!

Usability of Marquees

You should be careful when using marquees in HTML. Many web users dislike websites that contain scrolling text and other elements, so try to use them tastefully :)
Also note that the <marquee> tag is not part of the official HTML specification. Having said that, it is recognized by most major browsers.

No comments:

Post a Comment