HTML Marquee Tag Example


HTML Marquee Tag is a Nonstandard HTML tag that is used to move the text, images, or any content from the horizontal or vertical direction. We can control the marquee speed, marquee direction, marquee scroll delay and Stop or Start marquee on mouseover and exit using marquee attributes.

Syntax

<marquee>This is marquee tag</marquee>

Example of marquee tag

This is marquee tag

The marquee Tag Attributes

width: This attribute specifies the width of the marquee.

height: This attribute specifies the height of the marquee.

direction: The Direction attribute can change the direction of marquee,

behavior: The behavior attribute can be changed using the behavior attribute. there are three values. like as Scroll, Slide, and Alternate

scrolldelay: This attribute specifies how long to delay between each jump.

scrollamount: This attribute specifies the speed of marquee text.

loop: This attribute specifies how many times to loop.

bgcolor: This attribute specifies background color

hspace: This attribute specifies horizontal space around the marquee.

vspace: This attribute specifies vertical space around the marquee.

Marquee direction right example

Syntax

<marquee direction="right">This is marquee tag</marquee>

Output

This is marquee tag

Marquee Scroll behavior example

Syntax

<marquee behavior="scroll">This is marquee tag</marquee>

Output

This is marquee tag

Marquee Slide behavior example

Syntax

<marquee behavior="slide">This is marquee tag</marquee>

Output

This is marquee tag

Marquee Alternate behavior example

Syntax

<marquee behavior="alternate">This is marquee tag</marquee>

Output

This is marquee tag

How to Change Marquee Speed

Syntax

<marquee scrollamount="25">This is marquee tag</marquee>

Output

This is marquee tag

Stop Marquee on mouseover example

Syntax

<marquee onmouseover="stop()">This is marquee tag</marquee>

Output

This is marquee tag

Start Marquee on mouseout example

Syntax

<marquee onmouseover="stop()" onmouseout="start()">This is marquee tag</marquee>

Output

This is marquee tag