VOOZH about

URL: https://www.geeksforgeeks.org/html/html-marquee-behavior-attribute/

⇱ HTML Marquee behavior attribute - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

HTML Marquee behavior attribute

Last Updated : 12 Jul, 2025

The Marquee behavior attribute in HTML is used to set the behavior of scrolling. The default value is scroll. When set to "slide," it creates a sliding effect for the content, smoothly moving it horizontally or vertically based on the specified direction. This attribute is part of the <marquee> tag, which is used for creating scrolling text or images

Note: This attribute is depreciated from HTML5.

Syntax:

<marquee behavior=slide >

Attribute value:

Attribute Value

Description

alternate

It defines that text moving to the end and then starting in the opposite direction.

scroll

It has a default value.  specify the text scrolls to the end and starts over.

slide

It specifies the text moving to the end and then stops it.

Example: The implementation of the marquee attribute with an example.

Output:


Example: The implementation of marquee scroll attribute

Output:


Supported Browsers:

  • Google Chrome 1
  • Microsoft Edge 12
  • Firefox 65
  • Opera 7.2
  • Safari 1.2
Comment
Article Tags: