• 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

Categorized in: