Properties of ‘marquee’ tag and its different Attributes

In this HTML tutorial, today we will learn about a single tag, named as the marquee. The marquee tag comes in a pair. In other words, it has an opening as well as the closing tag. The marquee tag is used to create a scrolling effect, on text or an image. It is used to make the text or image to scroll vertically down or horizontally across in the web page.

Free cool 3d image hover effect source code download

Marquee tag and attributes in HTML

Here I am providing an HTML code to get the scrolling effect. You can customize it to make changes in this effect.

<!DOCTYPE html>
<html>
  <head>
    <title>Use of marquee tag </title>
  </head>
  <body>
      <h1><marquee = "any attributes">Codespeedy</marquee></h1>
      Codespeedy word is scrolling with the help of marquee tag.
  </body>
</html>

List of attributes of Marquee tag in HTML

These are the following attributes which you can use to adjust the look of the marquee tag:

AttributeValueDescription
behaviorscroll
slide
alternate
Specifies the scrolling type.
bg-colorrgb(x,x,x)
#xxxxxx
colour name
With the help of this, we can provide a background colour.
directionup
down
left
right
Specifies the direction of the scrolling.
heightpixels
%
Specifies the height of content inside the marquee tag.
h-spacepixelsSpecifies the horizontal space across the marquee tag.
loopnumberSpecifies, how many times the content will scroll. And if we don’t define this, the content will scroll without stopping.
scroll-amountnumberSpecifies the scrolling amount at each interval in pixels. And its default value is 6.
scroll-delaysecondsSpecifies how long delay will be between each jump. And its default value is 85 and the amount less than 60 will be ignored.
true-speedsecondsBasically, it is used to delay the scroll lesser than 60.
v-spacepixelsSpecifies the vertical space between the content inside the marquee tag.
widthpixels
%
Specifies the width of content inside the marquee tag.

Note: The marquee tag is a non-standard HTML tag. If you use this tag, your pages or apps may be broken or not work properly.

Also read,

Leave a Reply

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