Producing web pages
* HTML CSS DHTML XHTML A to Z of tags        Accessibility          Design

<marquee>

<marquee
align=left|center|right|top|bottom
behavior=type
bgcolor=colour
class=type
dir=ltr|rtr
direction=direction
height=n
hspace=n
id=value
lang=language
loop=n
scrollamount=n
scrolldelay=n
style=style
title=text
truespeed=string
vspace=n
width=n
</marquee>

Creates a scrolling text marquee; a bit like the Windows Marquee screen saver. If you want to set the font for a marquee, you must put the <font> tags outside the <marquee> tags. This tag doesn't appear in the HTML 4.0 specification and I don't think Netscape supports it.

Attributes

align=left|center|right|top|bottom

Specifies how the surrounding text should align with the marquee. The default is left.

Value…

Description…

left

Surrounding text aligns with the left of the marquee

center

Surrounding text aligns with the centre of the marquee

right

Surrounding text aligns with the right of the marquee

top

Surrounding text aligns with the top of the marquee

bottom

Surrounding text aligns with the bottom of the marquee

behavior=type

Specifies how the text should move. The type can be one of these values:

Value…

Description…

SCROLL

Start completely off one side, scroll all the way across and completely off, and then start again. This is the default

SLIDE

Start completely off one side, scroll in, and stop as soon as the text touches the other margin

ALTERNATE

Bounce back and forth within the marquee

bgcolor=colour

The background colour for the marquee. Enter a hexadecimal number (optionally preceded by a #), a red-green-blue colour value, or a predefined colour name as described in Using colour.

class=type

Indicates the class to which the tag belongs. You can use the class attribute in a style sheet to create different styles that you want apply to a single HTML tag. For example, you might create three different styles for a <marquee> tag. See Using the class attribute as a selector for more details.

dir=ltr|rtr

Specifies the direction of text. This can be left-to-right (ltr) or right-to-left (rtl). For example, English characters are presented left-to-right, Hebrew characters are presented right-to-left.

height=n

Specifies the height of the marquee, either in pixels or as a percentage of the screen height. To specify a percentage, the n must end with a percent sign (%).

hspace=n

Specifies left and right margins for the outside of the marquee, in pixels.

id=value

Specifies a unique name for the tag. No two tags can have the same id on a single page. The value must begin with a letter followed by any alphanumeric character, a hyphen, an underscore, a colon or a full stop. You use it to reference a unique style for a tag or to manipulate the tag with a script.

lang=language

Specifies which language the <marquee> tag uses. You can enter any valid ISO standard language abbreviation, for example, “en” for English, “de” for German and so on. For example, <span lang="es">hola! como esta?</span>.

This attribute helps search engines understand different languages as different languages rather than just misspelled English. It may also help spelling and grammar checkers and allow speech synthesizers to use language-dependent pronunciation rules.

loop=n

Specifies how many times a marquee will scroll. If loop is either -1 or INFINITE, the marquee will loop indefinitely.

scrollamount=n

Specifies the number of pixels between each successive draw of the marquee text.

scrolldelay=n

Specifies the number of milliseconds between each successive draw of the marquee text.

style=style

Specifies style information. See Style sheets for more information.

title=text

For information only. Some browsers display the title when you move the mouse over the tag (like a tool tip).

truespeed=string

With the truespeed flag set, all scrolldelay values are used as specified. If the truespeed flag is not set, then any values of scrolldelay of less than 59 mS are rounded to 60mS

vspace=n

Specifies top and bottom margins for the outside of the marquee, in pixels.

width=n

Sets the width of the marquee, either in pixels or as a percentage of the screen width. To specify a percentage, the n must end with a percent sign (%).