Marquee Tag in HTML

The Marquee tag is a non-standard HTML element which is used to scroll a image or text horizontally or vertically. In simple words, you can say that it scrolls the image or text up, down, left or right automatically.

Marquee's tag contains several attributes,some of them are

  • behavior:It facilitates user to set the behavior of the marquee to one of the three different types: scroll, slide and alternate.
  • direction: defines direction for scrolling content. It may be left, right, up and down.
  • width: defines width of marquee in pixels or %.
  • height: defines height of marquee in pixels or %.
  • bgcolor: defines background color.

<marquee [behavior="scroll"|"slide"|"alternate"] [direction="left"|"right"|"up"|"down"] [width=n%] 
[height=n%] [bgcolor="#rrggbb"]> some text or image </marquee>

Example : "marquee.html"
Basic Marquee: <br/><br/>
<marquee>Welcome to html marquee </marquee>
Scroll Marquee:<br/><br/>
<marquee width="100%" behavior="scroll" bgcolor="pink">  
This is an example of a scroll marquee...  
Slide Marquee:<br/><br/>
<marquee width="100%" behavior="slide" bgcolor="pink">  
This is an example of a slide marquee...  
Alternate Marquee:<br/><br/>
<marquee width="100%" behavior="alternate" bgcolor="pink">  
This is an example of a alternate marquee...  
Direction in marquee :<br/><br/>
<marquee width="100%" direction="right">  
 This is an example of a right direction marquee...  


Note:The <marquee> element is a non-standard HTML element.

Next Topic :List Tags in HTML