An HTML marquee is a scrolling element of text shown either horizontally across or vertically down your webpage. This is developed by using HTML marquees tag.
<marquee attribute_name="attribute_value"....more attributes> One or more lines or text message or image </marquee>
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 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.
Attribute | Description |
---|---|
direction | This attribute specifies the direction of scroll. Example – up, down, left or right. |
width | provides the width or breadth of a marquee. For example width="10" or width="20%" |
behavior | This attribute specifies the type of scrolling. Example- scroll, slid and alternate. |
height | provides the height or length of a marquee. For example height="20" or height="30%" |
scrolldelay | This attribute specifies the interval between each jump. |
scrollamount | provides a value for speeding the marquee feature |
loop | provides how many times the marquee will loop |
bgcolor | provides a background color where the value will be either the name of the color or the hexadecimal color-code. |
<html> <head> <title>Example for HTML Marquee Tag</title> </head> <marquee width="40%" direction="up" height="30%"> This is sample scrolling text. </marquee> </html>