Supported Browsers

HTML Tag

The <marquee> tag in HTML creates a scrolling text or image effect within a webpage. It allows content to move horizontally or vertically across the screen, providing a simple way to add dynamic movement to elements. It includes attributes like direction to specify whether the content moves left, right, up, or down.

Note: This tag is deprecated from HTML5.

Similar Reads

Syntax

<--- contents ---> ...

Attributes :

AttributesValuesDescriptionbgcolorColor NameDefine the background color of the marquee.directionTop, Down, Left, RightDefine the direction of scrolling the contentloopNumberSpecifies how many times content moves. The default value is infinite.heightpx or %Define the height of marqueewidthpx or %Define the width of marqueehspacepxSpecify horizontal space around marqueevspacepxSpecify vertical space around marquee...

Methods :

MethodDescriptionstart()Used to start the scrolling of the tag.stop()Used to stop the scrolling of the tag....

Event Handlers :

Event HandlerDescriptiononbounceTriggered when a scrolling reaches the end, exclusive to ‘alternate’ behavior. onfinishActivates when the completes scrolling loops specified by the ‘loop’ attribute. onstartFired at the initiation of scrolling for the HTML tag....

Examples of HTML Tag

Example 1: In this example, we will see implementation of above tag with right to left....

Supported Browsers

Google Chrome Edge FirefoxOperaSafari...

Contact Us