Marquee Tags

March 19th, 2008

Marquee Tutorial

The <marquee> tag is used to introduce text that scrolls horizontally within a display box. The usual warnings about the distracting and annoying nature of continuously running animations apply.

Here’s a simple example:

Hello World! And here’s the HTML:
<marquee>
<font color=”red” size=”3″>
Hello World!
</font color=”red” size=”3″>
</marquee>

IE3, apparently, does not honour any other tags that appear within a marquee so it is impossible to animate multi-coloured text or images this way. This restriction has been relaxed in IE4.

The tag, which is a container tag, has no fewer than 11 attributes.

  1. align This tag can take one of the values top, middle and bottom. It controls the positioning of the marquee display box relative to the current text in exactly the same manner as the <img> tag’s align attribute.
  2. behavior This tag controls the behaviour of the displayed text. There are three possible values. Text scrolling starts as soon as the page is downloaded, not when the user firsts scrolls the marquee into view.
    value effect example
    scroll text scrolls across display and re-appears from the other end when it has disappeared from one end. This is the default behaviour.
    slide This is similar to scroll except that when the sliding text reaches the far end of the box, it disappears and restarts at the starting end of the box. If the display is not looping then the text remains positioned at the far end of the box. Hello World
    alternate text “bounces” between the ends of the box Hello World
  3. bgcolor This tag controls the background colour of the display box, in the example above the display box background colour was set to aqua whereas the table cell background colour was set to white
  4. direction This attribute controls the direction of scrolling. Permissible values are left and right specifying the end of the box that the scroll starts from. Here’s some examples.
    value effect example
    right starts at right hand end Hello, World
    left starts at left hand end Hello, World

    It appears that the value of this attribute does not affect the behaviour of the marquee if the value of the behavior attribute is alternate

The following four attributes are used in exactly the same way as they are used with the <img> tag.

  1. height This controls the height of the display box.
  2. width This controls the width of the display box.
  3. hspace This controls the horizontal space around the display box.
  4. vspace This controls the vertical space around the display box.
  5. loop The value of this attribute controls the number of display cycles. The values -1 and infinite both mean continue indefinitely.
  6. scrollamount This controls the amount of movement (in pixels) between the successive displays that give the impression of animation.
  7. scrolldelay This controls the delay (in milliseconds) between the successive displays that give the impression of animation.Here are some examples
    scrollamount scrolldelay example
    5 5 Hello, World
    5 500 Hello, World
    50 5 Hello, World
    50 500 Hello, World

The final example should be enough to illustrate the distracting effects of too much animation.

Entry Filed under: Michael Ubamos,Tutorials

15 Comments Add your own

  • 1. Zenix  |  March 20th, 2008 at 2:17 am

    can i copy the htm,l code of that I wanna post it also on my site

  • 2. Garie Ernestine  |  April 1st, 2008 at 7:20 am

    nice!

  • 3. Garie Ernestine  |  April 1st, 2008 at 7:21 am

    cool!!

  • 4. simplyjacy  |  April 1st, 2008 at 6:48 pm

    lil’ bro,

    to copy the html code of this post, you can just right click and view source.

  • 5. marie  |  April 29th, 2008 at 3:28 am

    niiice

  • 6. perfect  |  May 21st, 2008 at 10:03 pm

    hi!

  • 7. ki-kate  |  May 30th, 2008 at 8:58 am

    very nice!!!!

  • 8. brittany  |  June 22nd, 2008 at 11:58 pm

    how do you put this on your page again?
    sorry im new on multi. still havent got the
    hang of css yet. thx for the help.

  • 9. nosmik  |  July 18th, 2008 at 8:13 am

    ehheeeemmm…did i make it right..?

  • 10. simplyjacy  |  July 21st, 2008 at 3:24 pm

    these marquee is not part of CSS. you can use these on your blog entries and titles.

  • 11. charmaene  |  September 30th, 2008 at 9:41 am

    good!

  • 12. girl  |  October 10th, 2008 at 8:00 pm

    the color won’t work..

  • 13. Vanj  |  January 7th, 2009 at 10:00 pm

    - tags are obsolete :) or deprecated already.

    Nice, your using wordpress.

  • 14. Vanj  |  January 7th, 2009 at 10:01 pm

    I mean “marque” tags are obsolete/deprecated already.

  • 15. Eirilav  |  November 16th, 2011 at 2:44 am

    it really helps me a lot.. :) )

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Calendar

February 2012
S M T W T F S
« Jan    
 1234
567891011
12131415161718
19202122232425
26272829  

Most Recent Posts