What is "marquee" tag and how I can use it in HTML?

Ask a question
4

Hi everyone. Please, help me to understand what marquee tag is, and how can I use it in HTML, is there any good implementation of it? Please, provide some examples. Thanks in advance.

Coin iconoffer bounty
add comment

4 Answers

2

The HTML <marquee> element is used to insert a scrolling area of text. By using its attributes, you will be able to regulate what happens when the text reaches the edges of its content area

<marquee>This text will scroll from right to left</marquee>

<marquee direction="up">This text will scroll from bottom to top</marquee>

<marquee direction="down" width="250" height="200" behavior="alternate" style="border:solid">
  <marquee behavior="alternate">
    This text will bounce
  </marquee>
</marquee>

Event handlers
onbounce
Fires when the marquee has reached the end of its scroll position. It can only fire when the behavior attribute is set to alternate.
onfinish
Fires when the marquee has finished the amount of scrolling that is set by the loop attribute. It can only fire when the loop attribute is set to some number that is greater than 0.
onstart
Fires when the marquee starts scrolling.

add comment
2

An HTML marquee is a scrolling piece of text displayed either horizontally across or vertically down your webpage depending on the settings. This is created by using HTML <marquees> tag.

Note − The <marquee> tag deprecated in HTML5. Do not use this element, instead you can use JavaScript and CSS to create such effects.
This is the list of important attributes which can be used with <marquee> tag.
1 width-this specifies the width of the marquee. This can be a value like 10 or 20% etc.

2 height-yhis specifies the height of the marquee. This can be a value like 10 or 20% etc.

3 direction-this specifies the direction in which marquee should scroll. This can be a value like up, down, left or right.

4 behavior-this specifies the type of scrolling of the marquee. This can have a value like scroll, slide and alternate.

5 scrolldelay-this specifies how long to delay between each jump. This will have a value like 10 etc.

6 scrollamount-this specifies the speed of marquee text. This can have a value like 10 etc.

7loop-this specifies how many times to loop. The default value is INFINITE, which means that the marquee loops endlessly.

8 bgcolor-this specifies background color in terms of color name or color hex value.

9.hspace-this specifies horizontal space around the marquee. This can be a value like 10 or 20% etc.

10.vspace -yhis specifies vertical space around the marquee. This can be a value like 10 or 20% etc.

add comment
0

The <marquee> tag in HTML is used for creating scrolling text or image in a webpages. It scrolls either from horizontally left to right or right to left, OR vertically top to bottom or bottom to top.
1.

<!DOCTYPE html> 
<html> 
<head> 
    <title>Marquee Tag</title> 
    <style> 
    .main { 
        text-align:center; 
    } 
    .marq { 
        padding-top:30px; 
        padding-bottom:30px; 
    } 
    .stack1 { 
        font-size:36px; 
        font-weight:bold; 
        color:white; 
        padding-bottom:10px; 
    } 
    </style> 
</head>  

<body> 
    <div class = "main"> 
    <marquee class="marq" bgcolor = "Green" direction = "left" loop="" > 
        <div class="stack1">stackdev</div> 
        <div class="stack2">A computer science portal for stacks</div> 
    </marquee> 
    </div> 
</body> 
</html>

2.

!DOCTYPE html> 
<html> 
<head> 
    <title>Marquee Tag</title> 
    <style> 
    .main { 
        text-align:center; 
        font-family:"Times New Roman"; 
    } 
    .marq { 
        padding-top:30px; 
        padding-bottom:30px; 
    } 
    stack1 { 
        font-size:36px; 
        font-weight:bold; 
        color:white; 
        text-align:center; 
    } 
    .stack2 { 
        text-align:center; 
    } 
    </style> 
</head>  

<body> 
    <div class = "main"> 
    <marquee class="marq" bgcolor = "Green" direction = "up" loop="" > 
        <div class="stack1">stackdev</div> 
        <div class="stack2">A question portal for stack</div> 
    </marquee> 
    </div> 
</body> 
</html>
add comment
0

When writing in HTML, the <marquee> tag is a block element used to designate an area that contains scrolling text or a scrolling image. This area is in a line by default, but can be changed to a box utilizing attributes. The following sections contain information about this tag, including examples of it in use, as well as related attributes and browser compatibility.

add comment

Your Answer