How ‹marquee› Tag works in HTML

1.1 Introduction

The HTML ‹marquee› tag is used for scrolling piece of text or image displayed either horizontally across or vertically down your web site page depending on the settings.

1.2 Syntax

‹marquee attribute="value"›content‹/marquee›

‹marquee direction="left" behavior="scroll" bgcolor="red" scrolldelay="100milisec"›Visit Lab‹/marquee›

1.3 Attributes of ‹img› tag

Attribute Value Description
behavior scroll, slide, alternate Defines the scrolling type.
direction up, down, left, right Sets the direction for the scrolling content.
bgcolor rgb(x,x,x), #xxxxxx, colorname Used to give a background color.
loop number Defines how many times the content will scroll. If we don't define this, the content will scroll forever.
scrollamount number Defines the scrolling amount at each interval in pixels. Default value is 6.
width pixel, percentage Defines the marquee's width.
height pixel, percentage Defines the marquee's height.
hspace pixels Defines horizontal space around the marquee.
vspace pixels Defines vertical space around the marquee.
scrolldelay seconds Defines how long delay will be between each jump. The default value is 85 and smaller amounts than 60 will be ignored.