Marquee in HTML

marquee for html

HTML Marquee:

Marque is a scrolling tag in HTML. It has both opening and closing tags. it is used to scroll any text or image like breaking news.

But it is not a standard method of scrolling text or images. We can do the same tusk using CSS codes.

Don't use Marque in your webpage. It can create problems in your website. Try to use CSS code instead of marque tag. But you can learn it as educational purpose.

<marquee> Tag:

For scrolling, just write anything inside the marquee tags. There are some attributes to control scrolling. They are: height, width, direction, scrolldelay, scrollamount etc.

Marque with right direction:

This is a sample scrolling text that has scrolls in the right direction.
<marquee width="80%" direction="right" height="100px">
This is a sample scrolling text that has scrolls in the right direction.
</marquee>

Marque with left direction:

This is a sample scrolling text with left direction.
<marquee width="80%" direction="left" height="100px">
This is a sample scrolling text with left direction.
</marquee>

Marque with up direction:

This is a sample scrolling text with up direction.
<marquee width="80%" direction="up" height="100px">
This is a sample scrolling text with up direction.
</marquee>

Marque with down direction:

This is a sample scrolling text with down direction.
<marquee width="80%" direction="down" height="100px">
This is a sample scrolling text with down direction.
</marquee>

You can also use scrolldelay, scrollamount, behavior etc in your marquee.

scrollamount 1, behavior scroll, direction up scrollamount 10, behavior slide, direction down scrollamount 20, behavior alternate, direction left scrollamount 40, behavior scroll, direction right
<marquee height="100px" width="85%" behavior="scroll" direction="up" scrollamount="1">scrollamount 1, behavior scroll, direction up </marquee>
<marquee height="100px" width="85%" behavior="slide" direction="down" scrollamount="10">scrollamount 10, behavior slide, direction down</marquee>
<marquee height="100px" width="85%" behavior="alternate" direction="left" scrollamount="20">scrollamount 20, behavior alternate, direction left</marquee>
<marquee height="100px" width="85%" behavior="scroll" direction="right" scrollamount="40">scrollamount 40, behavior scroll, direction right</marquee>
Twitter
Facebook
LinkedIn
WhatsApp
Tumblr
Reddit

If you find some necessity, Share the article to your social profile. Thanks a lot!