Learn HTML – <marquee> Tag

Description

The HTML <marquee> tag is used for scrolling piece of text or image displayed either horizontally across or vertically down your web site page depending on the settings.

Example

<!DOCTYPE html>
<html>

   <head>
      <title>HTML marquee Tag</title>
   </head>

   <body>
      <marquee>This is basic example of marquee</marquee>
      <marquee direction = "up">The direction of text will be from bottom to top.</marquee>
   </body>

</html>
This is basic example of marquee The direction of text will be from bottom to top.

Specific Attributes

The HTML <marquee> tag also supports the following additional attributes −

AttributeValueDescription
behaviorscroll
slide
alternate
Defines the type of scrolling.
bgcolorrgb(x,x,x)
#xxxxxx
colorname
Deprecated − Defines the direction of scrolling the content.
directionup
down
left
right
Defines the direction of scrolling the content.
heightpixels or %Defines the height of marquee.
hspacepixelsSpecifies horizontal space around the marquee.
loopnumberSpecifies how many times to loop. The default value is INFINITE, which means that the marquee loops endlessly.
scrolldelaysecondsDefines how long to delay between each jump.
scrollamountnumberDefines how how far to jump.
widthpixels or %Defines the width of marquee.
vspacepixelsSpecifies vertical space around the marquee.