An HTML marquee is a scrolling piece of text displayed either horizontally across or vertically down your webpage depending on how you specified it. This is formed by using HTML <marquees> tag.
The HTML <marquee> tag may not be supported by many modern browsers so it is not suggested to use this tag regularly, instead JavaScript and CSS should be used to create marquee related effects.
Syntax for Marquee
A simple syntax to use HTML <marquee> tag is as below:
<marquee attribute_name="attribute_value"....more attributes>
Text or image to marquee.
</marquee>
The <marquee> Tag Attributes
Attributes which can be used with <marquee> tag.
Attributes
|
Description
|
width
|
This sets the width of the marquee. This
can be a value like 10 or 20% etc.
|
height
|
This sets the height of the marquee. This
can be a value like 10 or 20% etc.
|
direction
|
This sets the direction in which marquee
should scroll. This can be a value like up, down, left or right.
|
behavior
|
This sets the type of scrolling of the
marquee. This can have a value like scroll, slide and alternate.
|
scrolldelay
|
This sets how long to delay between each
jump. This will have a value like 10 etc.
|
scrollamount
|
This sets the speed of marquee text. This
can have a value like 10 etc.
|
loop
|
This sets how many times to loop. The
default value is INFINITE, which means that the marquee loops endlessly.
|
bgcolor
|
This sets background color in terms of
color name or color hex value.
|
hspace
|
This sets horizontal space around the
marquee. This can be a value like 10 or 20% etc.
|
vspace
|
This sets vertical space around the
marquee. This can be a value like 10 or 20% etc.
|
<!DOCTYPE html>
<html>
<head>
<title>HTML marquee Tag</title>
</head>
<body>
<marquee>Scholars Marquee Example</marquee>
<marquee><img src="images/move.jpg" /></marquee>
</body>
</html>
No comments:
Post a comment