HTML <marquee> tag
HTML <marquee> tag
The <marquee>
tag is used to scroll the text either vertically or horizontally.
Note: It is otherwise called as running text.
Warning: The <marquee>
tag is deprecated and is no longer recommended.
Example
HTML Online Editor
<!DOCTYPE html>
<html>
<body>
<marquee>This text will scroll from right to left</marquee>
<marquee direction="up" style="height:250px;">This text will scroll from bottom to top</marquee>
</body>
</html>
Attributes
Attribute | Value | Explanation |
---|---|---|
behavior |
| Specifies how the text is scrolled within the marquee. |
bgcolor |
| Specifies the background color. |
direction |
| Specifies the direction ofthe scrolling within the marquee. |
height | px/percentage value | Specifies height width of the <marquee> element. |
hspace | px/percentage value | Specifies the horizontal spacing on either side. |
loop |
| Specifies the number of times the marquee will scroll. Default value is -1 |
scrollamount | px | Specifies the amount of scrolling at each interval in pixels. Default value is 6. |
scrolldelay | millisec | Specifies the interval between each scroll movement in milliseconds. |
truespeed | millisec | By default, scrolldelay values lower than 60 are ignored. |
vspace | px/percentage value | Specifies the vertical spacing on either side. |
width | px/percentage value | Specifies the width of the <marquee> element. |
Event Handlers
Event | Value | Explanation |
---|---|---|
onbounce | script | Script runs when the marquee has reached the end of its scroll position. works only when behavior=alternate |
onfinish | script | Script runs when the marquee has finished the amount of scrolling that is set by the loop attribute. |
onstart | script | Script runs when the marquee starts scrolling. |
Methods
Method | Value | Explanation |
---|---|---|
start() | script | It starts scrolling of the marquee |
stop() | script | It stops scrolling of the marquee. |
Reminder
Hi Developers, we almost covered 99.5% of HTML Tutorials with examples for quick and easy learning.
We are working to cover every Single Concept in HTML.
Please do google search for:
Join Our Channel
Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.
This channel is primarily useful for Full Stack Web Developer.