Skip to: content, navigation

by Ian Lloyd

marquee (HTML element)

Spec
Depr. Empty Version
Yes No N/A
Browser support full matrix
IE5.5+ FF1+ Saf1.3+ Op9.2+
Partial Partial Partial Partial
<marquee align=" { top | middle | bottom } " behavior=" { scroll | slide | alternate } " direction=" { left | right } " loop="value (number of loops)" bgcolor="color name or hex value" height="integer (pixels or %)" width="number (pixels or %)" hspace="integer (pixels or %)" vspace="number (pixels or %)" scrollamount="number" scrolldelay="number">
</marquee>

Example

A simple marquee with no additional attributes is marked up as follows:

<p><marquee>This text is a moving target. Don't you just love
it?</marquee></p>
Type
inline element
Contains
inline elements only
Contained by
block-level elements, inline elements

Description

The marquee element provides a way for browsers to render text that moves across the page without having to resort to JavaScript techniques. The marquee is non-standard but enjoys (or possibly suffers from) good browser support.

It is generally considered to be a very unfriendly element to use, one which presents difficulties for many users who may have difficulty tracking the text as it moves. Our advice is not to use it. JavaScript is a more suitable technique for moving text on screen - if there is a valid reason for doing this at all.

Use this for…

The marquee element should contain a short amount of text.

Compatibility

IE5.5Partial
6.0Partial
7.0Partial
Firefox1.0Partial
1.5Partial
2.0Partial
Safari1.3Partial
2.0Partial
3.0Partial
Opera9.2Partial
9.5Partial

Support for marquee is varied. Some browsers will stop animation regardless of loop settings, some interpret direction differently, some will honor height and width attributes, most pay no attention at all. However, given that this is not part of any HTML recommendation, this is perhaps to be expected. The simple answer is not to use it if you want to have valid documents that render consistently and don’t annoy the heck out of the reader.

In this Section

User-contributed notes

There are no comments yet.

Add a note

To post a note on this topic, please log in with your SitePoint username and password. If you don't have an account yet, you can create a new account for free.

Related Products

The Principles of Beautiful Web Design

Best Seller!

You don’t need to go to Art School to design great looking web sites!

Book Cover: The Principles of Beautiful Web Design

Download the FREE sample chapters