HTML - Marquee Tag

Ad Code

HTML - Marquee Tag

 


HTML - Marquee

Using <marquee> tag we can scroll text or image either horizontally or vertically on our web page.

Syntax

<marquee> The Scrolling Text or Image</marquee>


Example

<!DOCTYPE html>
<html>
   <head>
      <title>Scrolling Text Example</title>
   </head>	
   <body>
   <marquee> The Scrolling Text or Image</marquee>   
   </body>	
</html>


Output


The Scrolling Text or Image
Attributes of Marquee:
AttributesValueDescription
behaviorscroll
slide
alternate
It defines the scrolling type.
bgcolorrgb(x,x,x)
#xxxxxx
colorname
It is used to give a background color.
directionup
down
left
right
It sets the direction for the scrolling content.
heightpixels
%
It defines the marquee's height.
hspacepixelsIt defines horizantal space around the marquee.
loopnumberIt defines how many times the content will scroll. If we don't define this, the content will scroll forever.
scrollamountnumberIt defines the scrolling amount at each interval in pixels. Default value is 6.
scrolldelaysecondsIt defines how long delay will be between each jump. The default value is 85 and smaller amounts than 60 will be ignored.
truespeedsecondsIf you use this attribute, you can delay the scroll lesser than 60.
vspacepixelsIt defines vertical space around the marquee.
widthpixels
%
It defines the marquee's width.

Example of Direction attribute

<!DOCTYPE html>
<html>
   <head>
      <title>Scrolling Image right direction Example</title>
   </head>	
   <body>
   <marquee  direction="right"><img src="bird.gif"  width="100" height="100"></marquee>   
   </body>	
</html>

Output


Example of Behavior attribute

<!DOCTYPE html>
<html>
   <head>
      <title>Scrolling Image right direction Example</title>
   </head>	
   <body>
   <marquee  behavior="alternate">Alternate Text Scrolling</marquee>   
   </body>	
</html>

Output

Alternate Text Scrolling

Post a Comment

0 Comments

Ad Code