HTML MARQUEE WITH EXAMPLE
You can create scrolling display using
<marquee> tag.
SYNTAX
<marquee attribute_name="attribute_value"....more attributes>
text message or image
</marquee>
Example
1 Open Notepad and Paste the below code.
<!DOCTYPE html >
<html>
<body>
<marquee>You can create scrolling display.</marquee>
</body>
</html>
Output:
Note: Default <marquee> tag scroll the text or image from right to left.
2
Alternate Marquee Behavior
1 Open Notepad and paste the below code
2 <!DOCTYPE html >
<html>
<body>
<marquee behavior="alternate">This is alternate marquee behavior</marquee>
</body>
</html>
Save as marquee.html
Output:
3. Marquee use of direction ie. Right , Left , Down ,Up
a) Right Marquee Direction
1 Open Notepad and Paste the below code
2 <!DOCTYPE html >
<html>
<body>
<marquee direction="Right">This is alternate marquee behavior</marquee>
</body>
</html>
save as right.html
Output:
b) Left Marquee Direction
1 Open Notepad and Paste the below code
2
<!DOCTYPE html >
<html>
<body>
<marquee direction="left">This is alternate marquee behavior</marquee>
</body>
</html>
save as right.html
Output:
c) UP Marquee Direction
1 Open Notepad and Paste the below code
2
<!DOCTYPE html >
<html>
<body>
<marquee direction="up">This is alternate marquee behavior</marquee>
</body>
</html>
save as right.html
Output:
d) Down Marquee Direction
1 Open Notepad and Paste the below code
2
<!DOCTYPE html >
<html>
<body>
<marquee direction="Down">This is alternate marquee behavior</marquee>
</body>
</html>
save as right.html
Output: