HTML Marquee Tag

Marquee is one of the important tag introduced in HTML to support such scrollable texts and images within a web page. In this tutorial, you will be learning about the Marquee tag and its different attributes for developing a well-groomed static website.

The Marquee Tag

The <marquee> tag is a container tag of HTML is implemented for creating scrollable text or images within a web page from either left to right or vice versa, or top to bottom or vice versa. But this tag has been deprecated in the new version of HTML, i.e., HTML 5.

The different attributes of <marquee> tag are:

widthprovides the width or breadth of a marquee. For example width="10" or width="20%"
heightprovides the height or length of a marquee. For example height="20" or height="30%"
directionprovides the direction or way in which your marquee will allow you to scroll. The value of this attribute can be: left, right, up or down
scrolldelayprovides a feature whose value will be used for delaying among each jump.
scrollamountprovides a value for speeding the marquee feature
behaviorprovides the scrolling type in a marquee. That scrolling can be like: sliding, scrolling or alternate
loopprovides how many times the marquee will loop
bgcolorprovides a background color where the value will be either the name of the color or the hexadecimal color-code.
vspaceprovides a vertical space and its value can be like: vspace="20" or vspace="30%"
hspaceprovides a horizontal space and its value can be like: vspace="20" or vspace="30%"

Here's an example of how to use <marquee> tag in HTML:


    <title>Example for HTML Marquee Tag</title>

<marquee width="40%" direction="up" height="30%">
This is sample scrolling text.