HTML - Marquees

An HTML marquee is a scrolling piece of text displayed either horizontally across or vertically down your webpage depending on the settings. This is created by using HTML <marquees> tag.

HTML Marquee Attributes

Value 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.

Example :-

Below are few examples to demonstrate the usage of marquee tag.

Result :-
This is basic example of marquee

Example :-

Below are few examples to demonstrate the usage of marquee tag.

Result :-
This example will take only 50% width

Example :-

Below are few examples to demonstrate the usage of marquee tag.

Result :-
This text will scroll from left to right

Example :-

Below are few examples to demonstrate the usage of marquee tag.

Result :-
This text will scroll from bottom to up