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














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



Behavior attribute in marquee














<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 01, 2016
 
Updated On  -  Thursday, November 02, 2017

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250