How to use marquee tag in website

Marquee


<marquee> use for scrolling object in web browser
In The HTML element is <marquee> used to scrolling area of text, Images, and others. You can control scrolling behavior or direction also in a simple way just added some attributes.

This is Default Marquee Scroll



Marquee Attributes :

Behavior : mentioned how the objects is scrolling with the help of marquee tag.
in this attribute you can use this mentioned value =” (scroll, slide and alternate) “. If no value mentioned is specified, the default value is scroll.

Marquee Behavior Scroll
Marquee Behavior Slide
Marquee Behavior Alternate

bgcolor: You can sets the marquee tag area background color with the help of color name or hexadecimal value or RGB format.


Marquee bgcolor pink with default behavior scroll

<marquee bgcolor=”pink”>Marquee bgcolor pink with default behavior scroll</marquee>

direction : You can also sets the direction of the scrolling objects in marquee tag. 
in this attribute you can use this mentioned value =”(left, right, up and down)“.If no value mentioned is specified, the default value is left.


Marquee direction left Marquee direction right Marquee direction up with height 200 Marquee direction down with height 200

<marquee direction =”left”> Marquee direction left </marquee>
<marquee direction =”right”>Marquee direction right</marquee>
<marquee direction =”up” height=”200″>Marquee direction up with height 200</marquee>
<marquee direction =”down” height=”200″>Marquee direction down with height 200</marquee>

loop : Mentioned the how many times the marquee will scroll. If you not set the value is specified, the default value is โˆ’1, which means the marquee will scroll continuously.

This is Marquee Loop 2

<marquee loop=”2″>This is Marquee Loop 2</marquee>


Here I set the marquee loop value 2 after scrolling 2 times the marquee object will disappear the web page . and when you again reload the page the marquee will show you again scroll 2 times.


Scrollamount : The is attribute define the speed of scrolling marquee object. if you not use Scrollamount marquee runs defaults scrolling speed 6
marquee with scrollamount 10 marquee with scrollamount 25 marquee with scrollamount 20 marquee with scrollamount 110


<marquee scrollamount=”10″> marquee with scrollamount 10 </marquee>
<marquee scrollamount=”25″> marquee with scrollamount 25 </marquee>
<marquee scrollamount=”20″> marquee with scrollamount 20 </marquee>
<marquee scrollamount=”110″> marquee with scrollamount 110 </marquee>


Some Tricks :
This text will bounce

<marquee direction=”up” width=”200″ height=”200″ behavior=”alternate” style=”border:solid”>
  <marquee behavior=”alternate”>
    This text will bounce
  </marquee>
</marquee>

This text will bounce


<marquee behavior=”alternate” direction=”up” height=”200″ style=”border: solid;” width=”200″>
This text will bounce
</marquee>

Hover Over to Pause Marquee 

This is example of a Marquee that scrolls some news articles but when the user hover over it marquee it will pause and when the user hovers out of it (onMouseOut) that  start.

Example 1

<marquee onMouseOver=”this.stop()” onMouseOut=”this.start()”>Text</marquee>

Hover Over to Pause Marquee

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *