Various MARQUEE Codes

HTML code to make the image scroll

image
image image with text

<marquee><img src="image.gif" width="120" height="82" alt="image"></marquee>
<marquee><img src="circle.gif" width="120" height="82" alt="image">can add text here</marquee>

This alternate behavior makes the text scroll with in the page itself, you can see the preview here

alternate


<marquee behavior="alternate">alternate</marquee>

This width option makes the text scroll within the width of 200 you can also mention height="200" if you are using the marquee direction="up" or "down"

width 200

<marquee width="200">width 200</marquee>

Change the direction of the text to move


Moving towards top
Moving towards down
Moving towards right
Moving towards left

<marquee direction="up">Moving towards top</marquee>
<marquee direction="down">Moving towards down</marquee>
<marquee direction="right">Moving towards right</marquee>
<marquee direction="left">Moving towards left</marquee>

Change the background color of the text, Here #00ffff is the hexadecimal color code for aqua, click this link for more colors and there hexadecimal codes

background color changed

<marquee bgcolor="#00ffff">background color changed</marquee>

Make the text or image scroll for 5 times then stop, you can change the no of times of scrolling by changing the no of loop

This makes the text to scroll 5 times

<marquee loop="5">This makes the text to scroll 5 times</marquee>

Changing the scrollamount changes the speed of the marquee. Increasing the value increases the speed

scroll amount is set to 1
scroll amount is set to 10
scroll amount is set to 20

<marquee scrollamount="1">scroll amount is set to 1</marquee>
<marquee scrollamount="10">scroll amount is set to 10</marquee>
<marquee scrollamount="20">scroll amount is set to 20</marquee>

Here comes my fav, make the scrolling text stop on mouse over, it fine for displaying long text in a small space

here goes your text which wil stop on mouse over
<marquee onmouseover=this.stop(); onmouseout=this.start();>here goes your text which is to stops on mouse over</marquee>

Finally adding more effects to a single text or image, u can add many attributes by adding them after a space

<marquee onmouseover=this.stop(); onmouseout=this.start(); direction="up" height="100" bgcolor="#ff0000" behavior="alternate" scrollamount="5">TEXT WITH VARIOUS EFFECTS, YOU CAN ADD MORE ATTRIBUTES WITH A SPACE HOW I HAVE DONE</marquee>


TEXT WITH VARIOUS EFFECTS, YOU CAN ADD MORE ATTRIBUTES WITH A SPACE HOW I HAVE DONE

About Us