Articles → HTML → Marquee Tag In HTML

Marquee Tag In HTML






Purpose





Syntax


<!--For Text-->
<Marquee>Text</Marquee>
<!--For image-->
<Marquee><img src="image_source" /></Marquee>
<!--For image-->
<Marquee><input type="" /></Marquee>



Example


<html>
   <head>
      <title>Marquee Demo</title>
   </head>
   <body>
      <!--For Text-->
      <Marquee>This is the text</Marquee>
      <!--For image-->
      <Marquee><img src="http://gyansangrah.com/ArticleImages/introduction_to_windows_forms_using_visual_studio_one.jpg" /></Marquee>
      <!--For image-->
      <Marquee><input type="checkbox" /></Marquee>
   </body>
</html>




Picture showing the output of marquee tag in html

Click to Enlarge


Direction Attribute In Marquee




  1. Up (Moves content from down to up direction)
  2. Down (Moves content from up to down direction)
  3. Left (Moves content from right to left direction)
  4. Right (Moves content from left to right direction)


<Marquee direction="up|down|left|right">Content</Marquee>



Behavior Attribute In Marquee




  1. Scroll
  2. Slide
  3. Alternate




<html>
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   </head>
   <body>
      <!--Scroll-->
      <marquee behavior="scroll">This is the text</marquee>
      <!--Slide-->
      <marquee behavior="slide">This is the text</marquee>
      <!--Alternate-->
      <marquee behavior="alternate">This is the text</marquee>
   </body>
</html>




Picture showing the animation of marquee

Click to Enlarge


Loop Attribute In Marquee






<marquee Loop="loop_count">This is the text</marquee>





Scrollamount Attribute In Marquee






<marquee scrollAmount="scroll_amount_in_numbers">This is the text</marquee>



Scrolldelay Attribute In Marquee






<marquee scrolldelay="delay_in_numbers">This is the text</marquee>



Browser Support


Internet ExplorerFirefoxChromeSafariOperaEdge
YesYesYesYesYesYes



Posted By  -  Karan Gupta
 
Posted On  -  Tuesday, November 1, 2016
 
Updated On  -  Thursday, November 2, 2017

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250