Press "Enter" to skip to content

Marquee Example in HTML

Last updated on October 4, 2019

Definition :

  • Marquee is a tag which is meant for moving the content on the page. Not only the text, it will move images and videos also.
  • By default it will display left direction.

Program:

<html>

     <body>

                     <marquee> Hello </marquee>

                                 <marquee direction=”up”> Hello1 </marquee>

                                 <marquee direction=”down”> Hello2 </marquee>

                                 <marquee direction=”left”> Hello3 </marquee>

                                 <marquee direction=”right”> Hello4 </marquee>

                </body>

</html>

  • Both attributes we have to apply direction and behavior.
  • By default it will display the direction in scroll.

Program :

<html>

     <body>

                     <marquee> Hello </marquee>

                                 <marquee direction=”left” behavior=”slide”> Hello1 </marquee>

                                 <marquee direction=”left” behavior=”scroll”> Hello2 </marquee>

                                 <marquee direction=”left” behavior=”alternate”> Hello3 </marquee>

                </body>

</html>

  • Slide to display the starting point.
  • Scroll to display the circle on the way.
  • Alternate to display the this corner to that and that corner to this.
  • How to provide color for the content.

Program :

<html>

     <body>

                     <marquee behavior=”slide” bgcolor=”red” loop=”5″>

                                    <font color=”white”> Hello1 </font>

                                </marquee>

                </body>

</html>

Be First to Comment

    Leave a Reply

    Your email address will not be published. Required fields are marked *