HTML marquee tag

What is a marquee in HTML?

The marquee tag is a non-standard HTML element which scrolls text or image to up, down, left or right automatically. Marquee is created by using HTML <marquees> tag.

What is the purpose of marquee tag in HTML?

The marquee <marquee> HTML tag is used to highlights web content by scrolling text or image to up, down, left or right .

How many types of marquee are in HTML?

There are three types of marquee in html as below.

  1. scroll
  2. slide
  3. alternate

Syntax :

<marquee behavior="scroll">Scrolling marquee text</marquee>
<marquee behavior="alternate">Scrolling marquee text</marquee>
<marquee behavior="slide">Scrolling marquee text</marquee>

The <marquee> Tag Attributes

The different attributes of <marquee> tag are as below.

  1. width :  The width of the marquee.
  2. height : The height of the marquee
  3. direction : In which direction marquee will be scrolled.
  4. behavior : The type of scrolling of the marquee like scroll, slide and alternate.
  5. scrolldelay : Scroll delay time between each jump.
  6. scrollamount: It specifies the speed of marquee text.
  7. loop : It specifies how many times to loop. The default value is INFINITE.
  8. bgcolor : It specifies background color of marquee.
  9. hspace : It specifies horizontal space around the marquee.
  10. vspace : It specifies vertical space around the marquee.

Syntax :

<marquee behavior="slide" bgcolor="#00FF99" direction="left" height="50px;" width="200px"  scrolldelay="5" scrollamount="30">Scrolling marquee text</marquee>

 

Example :

<!DOCTYPE html>
<html>
<head>
<title>Learn HTML marquee tag by aryatechno</title>
</head>
<body>
<table>
<tr>
<td><b>It scrolls text left side. </b></td>
</tr>
<tr>
<td>
<marquee style="color:#FF0000">Learn html marquee tag with example</marquee>
</td>
</tr>

<tr>
<td><b>It scrolls text right side. </b></td>
</tr>
<tr>
<td>
<marquee direction="right" style="color:#FF0000">Learn html marquee tag with example</marquee>
</td>
</tr>

<tr>
<td><b>It scrolls text top side. </b></td>
</tr>
<tr>
<td>
<marquee direction="up" style="color:#FF0000">Learn html marquee tag with example</marquee>
</td>
</tr>

<tr>
<td><b>It scrolls text down side. </b></td>
</tr>
<tr>
<td>
<marquee direction="down" style="color:#FF0000">Learn html marquee tag with example</marquee>
</td>
</tr>

</table>
</body>
</html>

Output :

Comments

Leave a Reply

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

16573