The HTML marquee tag scrolls the included text either horizontally or vertically.
The HTML marquee tag was a useful addition to a website.
At one time almost every website had a scrolling marquee of text.
It was easy to add the tag to a web page. Creating some movement and highlighting a message, maybe some news or a call to action.
Replacements for the HTML marquee tag required more programming to move div layers, testing whether they had reached the end of the movement and ensuring compatibility with the range of browsers.
Implementation
The marquee tag comprises a pair of tags wrapping the text to be scrolled.
<marquee>Scrolling news text</marquee>
A number of attributes can be used to define the colour, speed and formatting of the scroll.
| Parameter | Description |
|---|---|
| behaviour | There are 3 options for the style of movement: scroll; slide; and alternate. |
| direction | Determines whether the scrolling of the text is from right to left (left) or left to right (right). the default value is right. Only works when behaviour is set to scroll. |
| loop | Sets the number of times the marquee will loop. The default is infinite. |
| scrollamount | Determines the step size, in pixels, by which the text is advanced. |
| scrolldelay | The number of milliseconds to delay the start of the marquee scrolling. |
| bgcolor | The background colour of the marquee. The default is transparent. The background colour can be defined by using one of the web colours or by an RGB value, for example #90dd77. |
| height | The height of the marquee area. The default is one text line |
| width | The width of the marquee. The default is full-width, 100%. |
| hspace | Horizontal space (left and right) between the marquee and the surrounding content |
| vspace | Vertical space (above and below) between the marquee and the surrounding content |
| align | This determines the alignment of the marquee with its surrounding elements. Options are top, middle and bottom. |
<marquee behavior=”slide” direction=”left”>Marquee text is entered here</marquee>
You may find, if using one of the CMS editors, that the text entered is modified, with the tags stripped away.
Current Browser Support
The tag is now considered to be outdated and not supported.
A quick test with the Chrome and FireFox browsers showed it to be still supported.
The Future – CSS3
CSS3 has introduced the concept of a marquee style. Although support for this is incomplete.
The standard for this is still under development, so expect some changes too.
marquee-style


