<marquee>

The HTML <marquee> element is deprecated and was used to create scrolling text or images on a webpage; contemporary methods now utilize CSS animations for similar effects.

<marquee> Tag

The <marquee> element creates scrolling text or images. However, it is deprecated, and CSS animations are recommended for modern scrolling effects.

Syntax

index.html
<marquee behavior="scroll|slide|alternate" direction="left|right|up|down" scrollamount="number" scrolldelay="number" loop="number">
  Your scrolling content here.
</marquee>

<marquee> Demo

This is a scrolling text example.
index.html
<marquee behavior="scroll" direction="left" scrollamount="5">
  This is a scrolling text example.
</marquee>
Used to create moving content either horizontally or vertically.

Attributes

  • direction: Defines the scrolling direction ( left, right up, down ).
  • behavior: Specifies movement type ( scroll, slide, alternate ).
  • scrollamount: Controls the speed of scrolling.
  • scrolldelay: Sets the delay (in milliseconds) between each scroll.

Key Points

  • Purpose: Originally used for scrolling text or images, commonly for announcements or advertisements.
  • Deprecated: The <marquee> tag is outdated and lacks accessibility and responsiveness.
  • Modern Alternative: Use CSS animations or JavaScript for scrolling or movement effects.
The <marquee> element is deprecated. Using CSS animations or JavaScript is recommended for better performance and accessibility.

Conclusion

The <marquee> tag was used to create scrolling text or images on a webpage, but it has been deprecated due to accessibility and responsiveness concerns. While it offers attributes like direction, behavior, and scrollamount to control the scrolling effect, it's no longer recommended for modern web development. For better performance and accessibility, CSS animations or JavaScript should be used as alternatives to achieve similar effects.