HTML Marquee Tag & Attributes

Sep 11, 2013, by admin

The HTML marquee tag provides a way for browsers to creates a scrolling effect (can be tailored to include any HTML content) vertically or horizontally without having to resort to JavaScript techniques.
The marquee is non-standard HTML tag but you can enjoy (or possibly suffers from) good browser support.

You can change the marquee attributes on MARQUEE tag by following ways.

Attributes:

BGCOLOR=”#CCCCCC” – Set background color.

LOOP – Determines how many times the text will scroll. -1 is indefinite and will continuously scroll. You can set this to whatever you’d like.

SCROLLAMOUNT – Determines the speed your text will scroll.

WIDTH – Determines the width of your marquee.

HEIGHT – Determines the height of your marquee.

Direction – Determines the direction in which the text should scroll – up or down.

BEHAVIOR=”slide” – Defines the type of scrolling.

SCROLLDELAY=”500″ – Defines how long to delay between each jump.

HSPACE – Specifies horizontal space around the marquee.

VSPACE – Specifies vertical space around the marquee.

<marquee
    bgcolor=”color name or hex value”
    loop=”value (number of loops)”
    align=”{ top | middle | bottom }”
    direction=”{ left | right }”
    behavior=”{ scroll | slide | alternate }”
    height=”integer (pixels or %)”
    width=”number (pixels or %)”
    hspace=”integer (pixels or %)”
    vspace=”number (pixels or %)”
    scrollamount=”number”
    scrolldelay=”number”>
    </marquee>

Event Attributes:

onclick
Script runs when a mouse click
ondblclick
Script runs when a mouse double-click
onmousedown
Script runs when mouse button is pressed
onmouseup
Script runs when mouse button is released
onmouseover
Script runs when mouse pointer moves over an element
onmousemove
Script runs when mouse pointer moves
onmouseout
Script runs when mouse pointer moves out of an element
onkeypress
Script runs when key is pressed and released
onkeydown
Script runs when key is pressed
onkeyup

Script runs when key is released