Marquee Tag in HTML W3Schools: Complete Guide with Examples

The tag in HTML is an element from the old HTML4 standard that allows text to be scrolled across the browser screen. It was a popular feature for creating attention-grabbing headlines or scrolling messages on static webpages. However, it's important to note that this tag is not supported in HTML5 and is deprecated.

The Greatest Infinite Marquee (HTML + CSS only) - Webflow
The Greatest Infinite Marquee (HTML + CSS only) - Webflow

W3Schools, a popular online learning resource for web technologies, provides a tutorial on the tag to help web developers understand its functionality and usage. Although it's not recommended for modern web design due to its lack of accessibility and responsiveness, understanding its usage can provide insight into the evolution of web design and development.

Marquee tag attributes
Marquee tag attributes

Understanding the Tag

The tag can contain text or other HTML elements and creates a horizontal or vertical scrolling effect. It was often used to create "ticker tape" or marquee display effects, similar to those seen in news websites or old-school video games.

HTML Full Form + 10 Essential Tags Every Beginner Must Know 🚀
HTML Full Form + 10 Essential Tags Every Beginner Must Know 🚀

The syntax of the tag is straightforward. It can be opened and closed like any other HTML tag, and it accepts several attributes to control the movement and appearance of the scrolling text. These attributes include direction, behavior, scrollamount, and more.

Direction and Behavior Attributes

887 reactions · 135 shares | HTML5 Tags information 2026. #coding #webdevelopment✨ #htmlcssjavascript #programming | Premi Coding | Facebook
887 reactions · 135 shares | HTML5 Tags information 2026. #coding #webdevelopment✨ #htmlcssjavascript #programming | Premi Coding | Facebook

The direction attribute controls the direction of the scroll. It can take two values: left and right for horizontal scrolling, or up and down for vertical scrolling.

The behavior attribute, on the other hand, controls how the marquee pauses for a pause attribute determined in milliseconds. It can be set to " Alternate" to reverse the direction after a specified amount of time or to "Scroll" to keep going in the same direction.

Scrollamount Attribute and Looping

Marquee in CSS - Beginner's Guide
Marquee in CSS - Beginner's Guide

The scrollamount attribute controls the speed of the scroll effect. A higher value makes the text scroll faster, whereas a lower value makes it scroll slower.

By using the loop attribute, you can control whether the marquee should repeat its scrolling effect a specified number of times or scroll indefinitely using loops="infinite". However, setting loops to "0" will stop the marquee after scrolling once.

Using the Tag in HTML
What are HTML Tags? List of common HTML Tags
What are HTML Tags? List of common HTML Tags

Here's a simple example of how to use the tag to create a horizontal scrolling effect with a pause of 20 seconds between loops:

This text will scroll from right to left, pause for 20 seconds, and then scroll back from left to right.

زينة مختبر الحاسوب.. وسوم لغة البرمجة التشعبية html
زينة مختبر الحاسوب.. وسوم لغة البرمجة التشعبية html
marquee tag in html - தமிழில் (html tags) #shorts
marquee tag in html - தமிழில் (html tags) #shorts
the basic html tag list is displayed in this screenshote screen graber, which shows
the basic html tag list is displayed in this screenshote screen graber, which shows
HTML Heading Tag Example
HTML Heading Tag Example
Coding - HTML Tags Cheat Sheet 😁  Comment missing Tags 😬 #html | Facebook
Coding - HTML Tags Cheat Sheet 😁 Comment missing Tags 😬 #html | Facebook
Span tag and Comment tag in HTML
Span tag and Comment tag in HTML
the 5 must know html tags for beginners infographical image below is an example of how to use them
the 5 must know html tags for beginners infographical image below is an example of how to use them
the top 10 html tags for every beginner should know - learn how to use them
the top 10 html tags for every beginner should know - learn how to use them
Harnessing the Power of the <img> Tag in HTML
Harnessing the Power of the <img> Tag in HTML
HTML5 Tags &HTML5 Attributes
HTML5 Tags &HTML5 Attributes
Pure CSS 3D Marquee Text Animation Effect
Pure CSS 3D Marquee Text Animation Effect
Essential HTML Tags Every Web Developer Needs! 🏷️
Essential HTML Tags Every Web Developer Needs! 🏷️
HTML video tag
HTML video tag
HTML TAGS | PART 2
HTML TAGS | PART 2
HTML Heading Tag Tutorial in Hindi | Complete Beginner Guide 🚀
HTML Heading Tag Tutorial in Hindi | Complete Beginner Guide 🚀
coding learning html tags
coding learning html tags
Source Code.dev
Source Code.dev
a computer screen with the text html and an image of a web page on it
a computer screen with the text html and an image of a web page on it
HTML Tag
HTML Tag
an image of a web page with the words'body'and'reader '
an image of a web page with the words'body'and'reader '

Responsiveness and Accessibility Issues

The tag is not supported in HTML5 and is deprecated due to several reasons. One of the main issues is that it's not responsive and doesn't work well on mobile devices or browsers with JavaScript disabled.

Moreover, it's not accessible to users with screen readers or other assistive technologies, making it a poor choice for modern web design that prioritizes accessibility. Therefore, it's recommended to use CSS animations or JavaScript for creating similar scrolling effects that are responsive and accessible.

While the tag may seem appealing for creating simple animations, it's essential to consider the evolution of web design and the need for accessibility and responsiveness. The knowledge of its usage can serve as a reminder of the past and a stepping stone to understanding more advanced animation techniques in modern web design.