×

Html & Html5

The World's best Software Development Study Portal

HTML Marquee tag


This <marquee> tag is use to scroll any text or image in vertical as well as horizontal direction.

1. Scroll marque:- In this type of marquee tag the content will be scrolling again and again upto infinite times


Let's understand this by the following example:


<h4>
<marquee width="100%" behavior="scroll"> I am scroll marquee tag </marquee>
</h4>

Output:


I am scroll marquee tag





2. Slide marque:- In this type of marquee tag the content will be sliding one time and than it will stops.


Let's understand this by the following example:


<h4 >
<marquee width="100%" behavior="slide" > I am slide marquee tag </marquee>
</h4 >

Output:


I am slide marquee tag





3. Alternate marque:- In this type of marquee tag the content will be scrolling first from right to left and than again left to right.


Let's understand this by the following example:


<h4><marquee width="100%" behavior="alternate"> I am alternate marquee tag </marquee> </h4>

Output:


I am alternate marquee tag





Some more attributes of < marquee > tag . Let's see some of them:-



Attribute Description
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 %
hspace defines horizontal space in pixels around the marquee.
vspace defines vertical space in pixels around the marquee.
scrolldelay defines scroll delay in seconds.
scrollamount defines scroll amount in number.
loop defines loop for marquee content in number.
bgcolor defines background color. It is now deprecated.