What is a marquee tag ?

  • In HTML it is used to create scrolling text or image in a webpage.
  • It scrolls either from vertically top to bottom or bottom to top or horizontally left to right or right to left.
  • The marquee element comes in pairs which means that the tag has opening and closing elements.
  • The marquee is divided into two methods they are start (), stop ().
  • Start () is used to start the scrolling of the Marquee Tag.
  • Stop () is used to stop the scrolling the marquee tag.

Syntax

<marquee>
   <--- contents --->
</marquee>

Sample Code

<!DOCTYPE html>
<html>
<head>
    <title>Marquee Tag</title>
    <style>
    .main {
        text-align:center;
    }
    .marq {
        padding-top:30px;
        padding-bottom:30px;
    }
    .geek1 {
        font-size:36px;
        font-weight:bold;
        color:blue;
        padding-bottom:10px;
    }
    </style>
</head>
 
<body>
    <div class = "main">
    <marquee class="marq" bgcolor = "Pink" direction = "left" loop="" >
        <div class="geek1">Welcome to Wikitechy</div>
        <div class="geek2">Kaashiv Infotech</div>
    </marquee>
    </div>
</body>
</html>                   

Output

Leave a Reply

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

You May Also Like

How to Align Text in HTML ?

By using markup language, HTML is used to design webpages. It defines the link between the webpages. It defines the structure of webpages where markup language is used to define…
View Answer

How do you add buttons in HTML ?

In HTML <button> tag is used to clickable button within form on your webpage. We can put content like image or text within the <button>to</button> tag. For <button> tag we should…
View Answer