The HTML <marquee> element is used to insert a scrolling area of text. You can control what happens when the text reaches the edges of its content area using its attributes.The <marquee> tag deprecated in HTML5. Do not use this element, instead, you can use JavaScript and CSS to create such effects.
Example -1
<!DOCTYPE html>
<html>
<body>
<marquee>This is an example of html marquee and this text
move from leftside to rightside by default </marquee>
</body>
</html>
|
Attributes:
Attributes
|
Value
|
Description
| |
behavior
|
scroll
slide alternate |
It defines the scrolling type.
| |
bgcolor
|
rgb(x,x,x)
#xxxxxx colorname |
It is used to give a background color.
| |
direction
|
up
down left right |
It sets the direction for the scrolling content.
| |
height
|
pixels
% |
It defines the marquee's height.
| |
hspace
|
pixels
|
It defines horizantal space around the marquee.
| |
loop
|
number
|
It defines how many times the content will scroll. If we don't define this, the content will scroll forever.
| |
scrollamount
|
number
|
It defines the scrolling amount at each interval in pixels. Default value is 6.
| |
scrolldelay
|
seconds
|
It defines how long delay will be between each jump. The default value is 85 and smaller amounts than 60 will be ignored.
| |
truespeed
|
seconds
|
If you use this attribute, you can delay the scroll lesser than 60.
| |
vspace
|
pixels
|
It defines vertical space around the marquee.
| |
Example -2
<!DOCTYPE html>
<html>
<body>
<marquee direction="up" behavior="alternate" style="height:100px">TEXT</marquee>
</body>
</html>
|