HTML marquee tag

<marquee> tag in HTML

The <marquee> tag is used for scrolling the specified text.

This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time.

Instead of <marquee> tag, we can now use the following CSS3 properties marquee-play-count, marquee-style, overflow-style, marquee-direction and marquee-speed.

Example

Try Yourself

attribute in <marquee> tag


behavior attribute in <marquee> tag

behavior attribute have the following three values scroll, slide, alternate.

scroll is the default value.

Example 1 - slide value

Try Yourself

Example 2 - alternate value

Try Yourself

Example 3 - scroll value

Try Yourself

bgcolor attribute in <marquee> tag

The bgcolor attribute is used to set the background color.

Example

Try Yourself

direction attribute in <marquee> tag

The direction attribute have the following four values left, right,up and top.

The default value is left.

Example 1 - Left and Right scrolling

Try Yourself

Example 2 - up and bottom scrolling

Try Yourself

loop attribute in <marquee> tag

The loop attribute is used to scroll the text for the given number of given times.

The default value is -1. It scrolls for unlimited time.

Example

Try Yourself

scrollamount attribute in <marquee> tag

The scrollamount attribute is used to set the speed of the scroll speed.

The default value is 6.

Example

Try Yourself

scrolldelay attribute in <marquee> tag

The scrolldelay attribute is used to set the interval between each scroll movement in milliseconds.

The default value is 60, and if the value is given below 60, the value is ignore and 60 is assign instead of the given value.

Example

Try Yourself

hspace attribute in <marquee> tag

The hspace attribute is used to set the horizontal margin.

By using the given value it sets the space between two positions, first it sets the space between the left margin and the starting position of the marquee, second it sets the space between the right margin and the ending position of the marquee.

Example

Try Yourself

vspace attribute in <marquee> tag

The vspace attribute is used to set the vertical margin.

By using the given value it sets the space between the marquee elements, top and bottom contents.

Example

Try Yourself