The <marquee> element once created a scrolling area of text (or other content). Authors tuned motion with presentational attributes such as direction and speed.
Default motion scrolls horizontally (typically right → left).
Treat as legacy. Valid for understanding old pages only.
Plan a CSS migrate for any real product UI.
Example 2 — Legacy direction / behavior
Old attributes controlled path and bounce. Do not use in new HTML.
HTML
<!-- Obsolete — for study only -->
<marquee direction="up">Scrolls upward</marquee>
<marquee behavior="alternate" direction="left">
Bounces back and forth
</marquee>
CSS ticker pattern (open Try It Yourself to see the animation run).
How It Works
Use a normal element (p, div, …) — not marquee.
Animate with CSS (animation + transform).
Add prefers-reduced-motion: reduce to disable continuous motion.
Offer pause controls when motion is essential to the UI.
Edge Cases & Pitfalls
The main risk is treating browser display as permission to keep shipping marquee.
obsolete
Do not use in new HTML
Validators and accessibility audits flag <marquee>. Author CSS motion instead.
a11y
Continuous motion harms users
Auto-scrolling text is hard to read and can trigger vestibular issues. Respect reduced-motion preferences.
presentational
Legacy attributes are not a design system
bgcolor, hspace, and speed attrs mix presentation into HTML. Move look and motion to CSS.
nesting
Nested marquees
Old demos nested marquees for bounce tricks. That is fragile and unreadable — never recreate it.
migration
Replace, do not polyfill forever
When cleaning legacy pages, swap to CSS animation (or static text) rather than emulating every marquee quirk.
Compatibility
Browser Support
<marquee> is a deprecated HTML element. Prefer CSS animation in every modern document.
✓ Deprecated · Legacy rendering
<marquee>
Still displayed in many browsers for old content, but obsolete for authors. Use CSS for new work.
LegacyAuthor guidance
Google ChromeRenders (legacy)
Deprecated
Mozilla FirefoxRenders (legacy)
Deprecated
Apple SafariRenders (legacy)
Deprecated
Microsoft EdgeRenders (legacy)
Deprecated
OperaRenders (legacy)
Deprecated
Samsung InternetRenders (legacy)
Deprecated
Internet ExplorerSupported (legacy)
Deprecated
<marquee>Do not use in new pages
Bottom line: Rendering support is not a green light. Migrate to CSS and treat marquee as archive knowledge.
Remember
Key Takeaways
Status:<marquee> is obsolete — study it, do not ship it.
Replacement: CSS animation + transform.
A11y: honor prefers-reduced-motion and avoid forced scrolling text.
Attributes: legacy speed/direction attrs stay in history books only.
One line: recognize <marquee>, replace it with CSS motion (or static text).
UA style
Default CSS Settings
Legacy engines implemented scrolling internally. Approximate modern recognition styling:
default.css
/* Legacy recognition only — do not depend on this */
marquee {
display: inline-block;
width: -webkit-fill-available; /* engine-specific historically */
}
/* Modern replacement sketch */
.ticker {
overflow: hidden;
white-space: nowrap;
animation: slide 8s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
.ticker { animation: none; }
}
Author new styles for your own elements. Leave marquee rules only while cleaning legacy CSS.
Frequently Asked Questions
No for new work. The marquee element is deprecated and obsolete. Do not use it in new pages.
It created a scrolling area of text. Authors controlled direction, speed, and bounce behavior with presentational attributes.
Use CSS animations and transforms for motion. Respect prefers-reduced-motion so users who need less motion are not forced into continuous scrolling.
Many browsers still render marquee for legacy pages, but support can shrink and behavior is inconsistent. Treat it as archive knowledge only.
Auto-moving text is hard to read, distracting, and problematic for vestibular disorders. Continuous motion without a pause control fails modern accessibility expectations.
They are legacy presentational attributes on an obsolete element. Learn them only to recognize old markup; do not ship them in new HTML.