Using the marquee tag in HTML



April 28, 2021

alt text

What's up guys? 😁✌️ Today we'll check the 'marquee' tag in HTML.

Even though this is tag is already deprecated in HTML5, I wanted to share it here since it's a 'quite different' tag.

So what does it do? The marquee tag creates a scrolling piece text from left to right, right to left, top to bottom or bottom to top. Just take a look at the video!

<marquee behavior="scroll" bgcolor="#eee"> They see me rolling, they hatin' </marquee> <marquee behavior="scroll" direction="right"> Scrolling to the right </marquee> <marquee direction="up"> Scrolling up </marquee> <marquee direction="down" loop="4"> Scrolling down but only four times </marquee>

We can pass some attributes to change its behavior, like: direction, number of loops' background color and behavior.

marquee { color: #e91e63; font-size: 1.6rem; font-weight: 600; margin: 2rem; }

How about you? Have you ever used the marquee element on any project? 🤔