0% found this document useful (0 votes)
7 views2 pages

Marquee Tag

The <marquee> tag in HTML creates scrolling text or images, with attributes to control direction, speed, behavior, height, and width. The behavior attribute allows for continuous scrolling, sliding to a stop, or bouncing back and forth. Examples illustrate how to implement each attribute for different scrolling effects.

Uploaded by

justthat710
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views2 pages

Marquee Tag

The <marquee> tag in HTML creates scrolling text or images, with attributes to control direction, speed, behavior, height, and width. The behavior attribute allows for continuous scrolling, sliding to a stop, or bouncing back and forth. Examples illustrate how to implement each attribute for different scrolling effects.

Uploaded by

justthat710
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Marquee Tag

The <marquee> tag in HTML is used to create scrolling text or images within a webpage. It
can scroll horizontally or vertically, depending on the attributes used.

Attributes of <marquee>:

1.​ direction
Specifies the direction of the scroll (left, right, up, or down).

Example:

<marquee direction="left">This text scrolls from right to left.</marquee>

2.​ scrollamount
Controls the speed of the scrolling text (higher values make the text move faster).

Example:

<marquee scrollamount="10">This text moves quickly.</marquee>

3.​ behavior
The behavior attribute in the <marquee> tag controls how the content behaves when it
scrolls across the screen. It defines the movement style of the marquee content, and there
are three possible values for this attribute:

●​ scroll (default)
The scroll behavior causes the content to continuously move across the screen in the
specified direction, starting from one edge and moving to the other. Once the content
reaches the end, it starts over.

Example:

<marquee behavior="scroll" direction="left">This text will scroll continuously.</marquee>

●​ slide
The slide behavior makes the content scroll across the screen and then stop once it reaches
the end. It behaves like a "sliding" effect, where the content slides in and pauses after it
finishes.

Example:

<marquee behavior="slide" direction="left">This text will slide across and stop.</marquee>


●​ alternate
The alternate behavior causes the content to scroll back and forth. When it reaches one
edge, it reverses direction and scrolls in the opposite direction, creating a "bouncing" effect.

Example:

<marquee behavior="alternate" direction="left">This text will move in alternate


direction.</marquee>

4.​ height
Defines the height of the marquee.

Example:

<marquee height="50">This is a tall marquee.</marquee>

5.​ width:
Defines the width of the marquee.

Example:

<marquee width="200">This marquee has a fixed width.</marquee>

You might also like