whadiz.com: What is?
Advertisement
Search Articles:     Home | About | Tools | Contact Us
You are here: Home > Web Design > HTML > HTML marquee
Games
Board Games
Online Games
Databases
Sql Server
Programming
Visual C# in ASP.Net
JavaScript
Humor
Satire
Web Design
Html

Clever Facts Section



What is HTML marquee? | HTML scrolling text | HTML marquee | HTML marquee codes

What is HTML marquee?

The HTML marquee is a non-standard tag for displaying scrolling text. The HTML marquee was originally designed by Microsoft for their Internet Explorer. Although the HTML marquee is still supported by most mayor browsers, the use of the HTML marquee is in most cases replaced by newer technologies like flash. In the end it should be stated that the HTML marquee does not allways render everywhere and does not allways render correctly. The HTML marquee remains a simple way of displaying announcements or to highlight things on a page.  

What is the basic syntax for HTML marquee?

The HTML marque in its simplest form is displayed as follow:

This is scrolling text using HTML marquee

The syntax is as follow:

<MARQUEE>This a scrolling text using HTML marquee</MARQUEE>

How to set the speed of the HTML marquee?

The HTML marquee has an attribute called SCROLLAMOUNT and SCROLLDELAY. These elements can be used together to set the speed of the HTML marquee. The HTML marquee moves text by waiting for a while and then rendering the text in a new position by jumping to a new position. SCROLLAMOUNT determines the amount of pizels to jump with each render of the HTML marquee. SCROLLAMOUNT has a default value of 6. SCROLLDELAY on the other hand determines how long to wait before the next render takes place. SCROLLDELAY has a value in milliseconds. SCROLLDELAY has a default value of 85.

Here are some examples:

This is a very fast scrolling HTML marquee.

<MARQUEE SCROLLDELAY="10" SCROLLAMOUNT="20">
   This is a very fast scrolling HTML marquee.
</MARQUEE>

This is a very slow scrolling HTML marquee.

<MARQUEE SCROLLDELAY="100" SCROLLAMOUNT="2">
   This is a very slow scrolling HTML marquee.
</MARQUEE>

How to set the direction of the HTML marquee?

The HTML marquee has an attribute called DIRECTION. The DIRECTION attribute determines in which direction the text will scroll. The DIRECTION attribute can either be LEFT, RIGHT, UP or DOWN.

Here are some examples:

This is HTML marquee scrolling RIGHT.

<MARQUEE DIRECTION="RIGHT">
   This is HTML marquee scrolling RIGHT.
</MARQUEE>

This is HTML marquee scrolling UP.

<MARQUEE DIRECTION="UP">
   This is HTML marquee scrolling UP.
</MARQUEE>

This is HTML marquee scrolling DOWN.

<MARQUEE DIRECTION="DOWN">
   This is HTML marquee scrolling DOWN.
</MARQUEE>

What alternate behaviour does the HTML marquee have?

The HTML marquee has an attribute called BEHAVIOR. The BEHAVIOR attribute can have one of 3 values:

  1. SCROLL: The SCROLL attribute will slide the text into the HTML marquee and out again. This is the default behavior.
  2. SLIDE: The SLIDE attribute will scroll the text into the HTML marquee and will stop as soon as the text hits the side. During testing, the SLIDE attribute did not work correctly in FireFox Version 1.0.6.
  3. ALTERNATE: The ALTERNATE attribute will scroll text back and forth within the HTML marquee.

Here are some examples:

This is a HTML marquee with SLIDE behavior.

<MARQUEE BEHAVIOR="SLIDE">
   This a HTML marquee with SLIDE behavior.
</MARQUEE>

This is a HTML marquee with ALTERNATE behavior.

<MARQUEE BEHAVIOR="ALTERNATE">
   This a HTML marquee with ALTERNATE behavior.
</MARQUEE>

Will the HTML marquee work correctly with other HTML markup like images?

Yes, have a look at the example below:

whadiz.com: <strong>HTML marquee</strong>

<MARQUEE DIRECTION="RIGHT">
    <IMG SRC="http://www.whadiz.com/images/articleimages/dalmation_marquee.gif" />
</MARQUEE>

What other attributes or codes does the HTML marquee have?

ALIGN CENTER
LEFT
RIGHT
BEHAVIOR SCROLL
SLIDE
ALTERNATE
BGCOLOR The background color of the html marquee.
DIRECTION LEFT
RIGHT
UP
DOWN
WIDTH Determines the width of the HTML marquee either in pixels or a percentage value.
HEIGHT Determines the height of the HTML marquee either in pixels or a percentage value.
HSPACE Number of pixels to the right and the left of the HTML marquee.
VSPACE Number of pixels to the top and the bottom of the HTML marquee.
LOOP Determines the number of times the HTML marquee should loop. The default value is INFINITE.
SCROLLAMOUNT Determines the number of pixels the HTML marquee should should with each rerender.
SCROLLDELAY Determines how long in milliseconds the HTML marquee should wait before it should rerender.

What browsers support HTML marquee?

Most modern browsers support HTML marquee. Internet Explorer 3+, as well as FireFox supports HTML marquee. The use of HTML marquee is limited in FireFox, as some attributes of the HTML marquee might not be supported. Netscape never supported HTML marquee and only started supporting HTML marquee from Netscape version 7. HTML marquee support is thus limited in browsers like Firefox, Opera and Safari. FireFox, Opera and Safari does not gaurantee correct rendering and they support the HTML marquee purely for legacy page compatibility.

What happens if HTML marquee is not supported?

If the HTML marquee is not supported, the text within in the HTML marquee will not scroll and will simply stand still. Thus you should allways make sure that the text looks and renders correctly if the HTML marquee is not supported by the browser being viewed in.

Is the usage of HTML marquee recommended?

No, the use of HTML marquee is not recommended. HTML marquee was an invention by Microsoft. The HTML marquee is unofficial in XHTML and HTML. JavaScript implementations of a scrolling text marquee might be more reliable if reliability is of concern. Have a look at this example of a JavaScript slide marquee.

Link to this article:

Browse some more: Next Article | Next Fact | More HTML Articles | More Clever Facts


Copyright © 2019 whadiz.com. All rights reserved.
whadiz.com: What is HTML marquee? | HTML scrolling text | HTML marquee | HTML marquee codes
Home of the answer "what is"
Website designed by IT Trader & hosted by CMWeb