Let us see how to animate the text with Marquee Tag. The Marquee tag is an HTML element that makes text to move in different directions.

 

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Text formating tag</title>
</head>

<body>
<marquee>Sai Ram</marquee><!-----------scrolls from left to right----->
<marquee direction="right">SAI RAM</marquee>
<marquee direction="down" style="height:200px; border:1px solid #C09;">TEXT</marquee></br>
<marquee direction="left">SAI RAM</marquee></br></br></br>
<marquee direction="up">TEXT</marquee>
<marquee behavior="alternate" direction="right" style="background-color:#06F">SAI RAM</marquee>
</body>
</html>

 

 

  •  In the above program the text placed in between the starting and ending of marquee tag will scroll from left to right.
  •  If we want to move the text in directions like(left,right,up,bottom) we need to use an attribute called "direction" 
        Syntax:
    direction="right" (or) direction="top"
  •  We can simply specify the width and height attributes to scroll the text in particular area.
  •  One more attribute is behaviour="alternate" that mean the text will animate alternatly from left to right or right to left.

OUTPUT:

html-marquee-tag


We will provide you Codes for C, C++, Java, Python, Web Technologies and many more

C Codes FlowCharts C++ Codes Java Codes HTML Tech Videos

Submit Your Code to Share with other Friends

Signup to programming9.com

Register Here Login Here