html
  1. html-marquee-tag

HTML <marquee> Tag

  • The HTML <marquee> tag is used to create a scrolling text or an image marquee on a web page.
  • The content inside the marquee will move from one side to another continuously.

Syntax

The basic syntax of the <marquee> tag is as follows:

<marquee>Content goes here...</marquee>

Example

To create a simple text marquee, you can use the following code:

<marquee>Hello, World!</marquee>
Try Playground

When you run the above code, it will create a horizontal scrolling text marquee of "Hello, World!" on a web page.

Explanation

The <marquee> tag is a non-standard HTML tag that is only supported in older versions of web browsers. It's not recommended to use this tag in modern HTML code because it has accessibility and usability issues. However, it can be useful for creating some basic animations on a web page.

You can customize the behavior of the <marquee> tag by using the following attributes:

  • behavior: Sets the direction of the scroll. The possible values are "scroll", "slide", and "alternate".
  • direction: Sets the direction of the scroll. The possible values are "left", "right", "up", and "down".
  • scrollamount: Sets the speed of the scroll. The value can be any integer.
  • scrolldelay: Sets the time delay between each scroll. The value can be any integer.

Use

The <marquee> tag can be used to create a basic scrolling text or image marquee on a web page. However, it's not recommended to use this tag in modern HTML code because of its accessibility and usability issues. If you need to create animations on a web page, you should use CSS animation instead.

Important Points

  • The <marquee> tag is a non-standard HTML tag that is only supported in older versions of web browsers.
  • It's not recommended to use this tag in modern HTML code because of its accessibility and usability issues.
  • You can customize the behavior of the <marquee> tag by using various attributes.

Summary

The HTML <marquee> tag is used to create a scrolling text or an image marquee on a web page. However, it's not recommended to use this tag in modern HTML code because of its accessibility and usability issues. If you need to create animations on a web page, you should use CSS animation instead.

Published on: