HTML Scrolling Text

This page contains HTML code for creating scrolling text.

You can create scrolling text in HTML using the <marquee> tag, or you can create CSS scrolling text (the preferred method). You can make your text scroll from right to left. You can make it scroll left to right. You can make it bounce back and forth. You can make it scroll up or down. You can even make your text zoom in from the side and stay in the same place.

CSS Method - Right to Left

Here's the recommended method of scrolling text. See CSS scrolling text if you need to scroll from left to right or vertically.

Source CodeResult

Scroll left...

Right to Left

When I created this page, it was way back before CSS animations were a thing. Back then, the HTML <marquee> tag was the only reliable way to get text to scroll. Only problem is that the <marquee> tag is actually non-standard HTML

Therefore, I recommend that you use the CSS method above, or see CSS Scrolling Text or CSS Marquee for more examples of the CSS method.

However, for those so inclined, the remaining examples on this page use the (non-standard) <marquee> tag.

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!

Falling Text

Here's a little trick that creates scrolling text that falls like snow.

To use this, change the bit that reads Scrolling text... to the text that you want to scroll. You can also change any of the other settings to modify how the text falls, how high the falling text is, etc.

Source CodeResult
Scrolling text... Scrolling text... Scrolling text... Scrolling text... Scrolling text... Scrolling text... Scrolling text... Scrolling text... Scrolling text... Scrolling text... Scrolling text... Scrolling text... Scrolling text... Scrolling text... Scrolling text... Scrolling text... Scrolling text... Scrolling text... Scrolling text... Scrolling text... Scrolling text...

More Marquee Codes

You can do much more with HTML marquees than is covered on this page. Here's the full list of marquee codes on this website:

Marquee Generator

Also check out the Marquee Generator.

Marquee Usability

Try to be careful when using HTML marquees. Many web users dislike websites that contain scrolling or bouncing images and other elements, so try to use them tastefully :)