MARQUEE Tag

The HTML <marquee> tag is used for scrolling any HTML contents displayed on a webpage either horizontally across or vertically down depending on the settings.
Start tag/end tag :- Both required

AttributeValueDescription
behaviorscroll/slide/alternateDefines the type of scrolling
bgcolorrgb color value or color namebackground color of the scrolling area
directionup/down/left/rightDefines the direction of scrolling content
heightpixels or %Defines the height of the marquee
loopnumberSpecifies how many time to loop. The default value is INFINITE
widthpixels or %Defines the width of marquee

Example -1

<!DOCTYPE html>
<html>
<head>
<title>HTML marquee Tag</title>
</head>
<body>
<marquee>This is basic example of marquee</marquee>
</body>
</html>
Output
This is basic example of marquee

Example -2

<!DOCTYPE html>
<html>
<head>
<title>HTML marquee Tag</title>
</head>
<body>
<marquee>This is basic example of marquee</marquee>
<marquee direction="right">This is an example of marquee text going left to right</div>
</body>
</html>
Output
This is basic example of marquee
This is an example of marquee text going left to right

Example -3

<!DOCTYPE html>
<html>
<head>
<title>HTML marquee Tag</title>
</head>
<body>
<marquee bgcolor="green" height="200" direction="up">
<h2>
using marquee with green bgcolor 
</h2>
</marquee>
</body>
</html>
Output

using marquee with green bgcolor

Example -4

<!DOCTYPE html>
<html>
<head>
<title>HTML marquee Tag</title>
</head>
<body>
<marquee bgcolor="green" height="200" direction="up">
<p>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.</p>
<p>
 It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum
</p>
</marquee>
</body>
</html>
Output

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.

It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum

September 16, 2016 at 1:45 am | HTML | No comment