Why was `<marquee>` deprecated?
`<marquee>` was never part of a robust modern web standard and provides poor control over accessibility, motion preferences, and responsive behavior. Modern CSS animations are easier to maintain and integrate with reduced-motion handling.
Modern CSS alternative
The standard approach is `@keyframes` + `animation` with an overflow-hidden container. You keep full control over timing, direction, typography, and can pause or disable motion based on user preferences.
Pure HTML/CSS scrolling text snippet
Copy this snippet as a drop-in replacement for legacy marquee behavior.
<div class="marquee-wrap">
<p class="marquee-text">Your scrolling text goes here</p>
</div>
<style>
.marquee-wrap {
width: 100%;
overflow: hidden;
white-space: nowrap;
background: #111;
color: #fff;
padding: 8px 0;
}
.marquee-text {
display: inline-block;
padding-left: 100%;
animation: marquee 12s linear infinite;
}
@keyframes marquee {
0% { transform: translateX(0); }
100% { transform: translateX(-100%); }
}
</style>When to use the generator instead
Use the generator when you need pixel-perfect preview, transparent export for video overlays, multi-line credits, perspective motion, or reusable embed code for production workflows.