0% found this document useful (0 votes)
506 views

Unit2 L5 HTML Marquee

The HTML <marquee> tag is used to create a scrolling piece of text on a webpage. It can scroll horizontally or vertically depending on direction attributes. Attributes like width, height, direction, behavior, scrolldelay and scrollamount control the appearance and movement of the marquee text. Examples demonstrate how to use the <marquee> tag and its various attributes to create scrolling text banners in different directions and speeds.

Uploaded by

princy
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
506 views

Unit2 L5 HTML Marquee

The HTML <marquee> tag is used to create a scrolling piece of text on a webpage. It can scroll horizontally or vertically depending on direction attributes. Attributes like width, height, direction, behavior, scrolldelay and scrollamount control the appearance and movement of the marquee text. Examples demonstrate how to use the <marquee> tag and its various attributes to create scrolling text banners in different directions and speeds.

Uploaded by

princy
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 11

HTML

(Hypertext Markup Language)


HTML - Marquee Tag

An HTML marquee is a scrolling piece of text displayed either


horizontally across or vertically down your webpage depending
on the settings. This is created by using HTML <marquees> tag.
Example

<html>

<head>
<title>HTML marquee Tag</title>
</head>

<body>
<marquee>This is basic example of marquee</marquee>
</body>

</html>
The <marquee> Tag Attributes
Sr.No Attribute & Description
width This specifies the width of the marquee. This can be a value like 10 or 20% etc.

height This specifies the height of the marquee. This can be a value like 10 or 20% etc.
This specifies the direction in which marquee should scroll. This can be a value like up, down,
direction left or right.
behavior This specifies the type of scrolling of the marquee. This can have a value like scroll,
slide and alternate.
scrolldelay This specifies how long to delay between each jump. This will have a value like 10 etc.
scrollamount This specifies the speed of marquee text. This can have a value like 10 etc.

loop This specifies how many times to loop. The default value is INFINITE, which means that the
marquee loops endlessly.
bgcolor This specifies background color in terms of color name or color hex value.
Example
<!DOCTYPE html>
<html>

<head>
<title>HTML marquee Tag</title>
</head>

<body>
<marquee width = "50%">This example will take only 50% width</marquee>
</body>

</html>
Example
<!DOCTYPE html>
<html>

<head>
<title>HTML marquee Tag</title>
</head>

<body>
<marquee direction = "right">This text will scroll from left to right</marquee>
</body>

</html>
Example
<!DOCTYPE html>
<html>

<head>
<title>HTML marquee Tag</title>
</head>

<body>
<marquee direction = "up">This text will scroll from bottom to up</marquee>
</body>

</html>
Example

<!DOCTYPE html>
<html>
<head>
<title> HTML Scroll Attribute </title>
</head>
<body>
<marquee width="100%" behavior="scroll" direction="up">
This is an example of a scroll marquee Up Side Direction...
</marquee>
</body>
</html>
Example

<!DOCTYPE html>
<html>
<head>
<title> HTML Scroll Attribute </title>
</head>
<body>
<marquee width="100%" behavior="slide" >
This is an example of slide marquee
</marquee>
</body>
</html>
Example

<!DOCTYPE html>
<html>
<head>
<title> HTML Scroll Attribute </title>
</head>
<body>
<marquee width="100%" behavior="alternate">
This is an example of a alternate marquee
</marquee>
</body>
</html>
<!DOCTYPE html>
<html >
<head>
<title> HTML Marquee Direction Attribute </title>
</head>
<body>
<marquee width="100%" behavior="scroll" direction="up">
This is an example of a Up side direction marquee...
</marquee>
<marquee width="100%" behavior="scroll" direction="down">
This is an example of a Down side direction marquee...
</marquee>
<marquee width="100%" behavior="scroll" direction="right">
This is an example of a Right side direction marquee...
</marquee>
<marquee width="100%" behavior="scroll" direction="left">
This is an example of a Left side direction marquee...
</marquee>
</body>
</html>

You might also like