Home Advertise with us Forum Articles Sitemap Contact
Logo  

HTML Marquee

It is possible to create a scrolling text or scrolling image using the <marquee> tag which is a non-standard HTML element. The <marquee> tag causes automatic scrolling of text or image up, down, right or left.

Code Results
Example of Slide-in Text

<marquee behavior="scroll" direction="left">Your text here </marquee>
Your text here

Just like any other HTML tag, the <marquee> tag is also associated with attributes. There is a complete list of attributes that the <marquee> tag supports:

Behavior: Helps in specifying the behavior of the marquee to one of the three types namely – scroll, slide or loop. Scroll is set as the default behavior of the marquee.
Direction: Allows setting the direction of the marquee box to, right- to-left, left-to-right, up-to-down or down-to-up.

Bgcolor: Used for setting the background color of the marquee.

Loop: Sets the number of times the marquee should loop its text. Loops are counted according to the number of times the text reaches the each end of the marquee.

Width: Sets the width of the marquee. By default, the width of the marquee is 100%.

Scrollamount: This indicates the total number of pixels the text travels between the frames. A Scrollamount 1 indicates the slowest scroll speed.

Scrolldelay: This indicates the number of milliseconds the frame would last. A Scrolldelay of 1000 indicates that the frame would last for one thousand milliseconds or more precisely one second.

Code Results
<marquee height="25" width="100%" align="right" direction="right"
scrolldelay="250" bgcolor="#CC66CC"><font color="#FFFFFF">

<strong>This is a scrolling text</strong>

</font></marquee>
This is a scrolling text
 

HTML Tip 1

Use only hexadecimal #RGB values for colors. The behavior of named colors is browser-idiosyncratic and totally unpredictable.
 
 

HTML Tip 2

You can resize your images without a graphics program by changing the HEIGHT and WIDTH in your image tag.