<Marquee> HTML Tag

In this article we will discuss about how to use the Marquee Tag in HTML.
  • 1844

The <marquee> tag in HTML is used to scroll the text across the website screen. We can set its various attributes according to the requirement of the application.

Direction: Allows setting the direction of the marquee box to, right- to-left, left-to-right, up-to-down or down-to-up.

Bgcolor: Used for setting the background color of the marquee.

Loop: Sets the number of times the marquee should loop its text. Loops are counted according to the number of times the text reaches the each end of the marquee.

Width: Sets the width of the marquee. By default, the width of the marquee is 100%.

Scrollamount: This indicates the total number of pixels the text travels between the frames. A Scrollamount 1 indicates the slowest scroll speed.

Scrolldelay: This indicates the number of milliseconds the frame would last. A Scrolldelay of 1000 indicates that the frame would last for one thousand milliseconds or more precisely one second.

HTML Code:

<html>

<body>

    <div style="width: 400px; height: 400px;">

        <font size="4" face="monotype coursiva" color="blue">

            <marquee width="100%" behavior="SCROLL" direction="RIGHT" bgcolor="pink">I am the best person in the world.</marquee>

        </font><font size="4" face="times new roman" color="red">

            <marquee width="100%" behavior="SCROLL" direction="left" bgcolor="yellow">I am the best person in the world.</marquee>

        </font>

    </div>

</body>

</html>
 

Output:

I am the best person in the world. I am the best person in the world.

Ask Your Question 

 
Got a programming related question? You may want to post your question here
 
© 2020 DotNetHeaven. All rights reserved.