World Library  
Flag as Inappropriate
Email this Article

Marquee element

Article Id: WHEBN0003139745
Reproduction Date:

Title: Marquee element  
Author: World Heritage Encyclopedia
Language: English
Subject: Online exhibition, Gecko (software), HTML, Comparison of layout engines (non-standard HTML)
Publisher: World Heritage Encyclopedia

Marquee element

A video of an HTML marquee displaying the text "WorldHeritage".

The marquee tag is a non-standard HTML element which causes text to scroll up, down, left or right automatically. The tag was first introduced in early versions of Microsoft's Internet Explorer, and was compared to Netscape's blink element, as a proprietary non-standard extension to the HTML standard with usability problems. The W3C advises against its use in HTML documents.

Usability problems

Marquee can be distracting.[1] The human eye is attracted to movement,[2] and marquee text is constantly moving.

As with the blink element, because the marquee tagged images or text are not always completely visible, it can make printing such webpages to a paper hard-copy an impossible and inefficient task where the specific printed pages where the messages on screen scroll or blink have to be printed multiple times to capture all the pieces of text that could be displayed at any one given moment in time. The behavior="alternate" version of marquee makes text jitter back and forth but does not obscure any part of it if scrolling widths are set correctly.

Because marquee text moves, links within it are more difficult to click than those in static text, depending on the speed and length of the scrolling. Users only get one chance every time it scrolls past. Also, scrolling text too fast can make it unreadable to some people, particularly those with visual impairments. This can easily frustrate users. To combat this, most client-side scripting allows marquees to be programmed to stop when the mouse is over them.


Unlike its blinking counterpart, the marquee element has several attributes that can be used to control and adjust the appearance of the marquee.

Uses the same syntax as the img element.
Allows the user to set the behavior of the marquee to one of three different types:
  • Scroll (default) – Scrolls the text from right-to-left, and restarts at the right side of the marquee when it has reached the left side. Text disappears when looping finishes.
  • Slide – When used in absence of the 'Behavior' attribute, contents to be scrolled will slide the entire length of marquee but stops the moment it hits the end, so that the contents will be displayed. But if it is used with attribute 'Behavior' then the attribute 'Slide' will be ignored.

Loops are counted by each time it reaches each end of the marquee; a loop of 1 is different from 'Slide' attribute. when item is being scrolled with 'Slide' attribute, item will stop permanently at the end of length of the marquee, displaying the entire item. However, when an item is being scrolled without a 'Loop' attribute, the number of scrolls will be repeated according to what number 'Loop' is equal to. If 'Loop=1' then item will scroll only once and will exit the length of marquee completely, while the item being scrolled will stop would be the same as 'Slide'. By default, 'Loop=infinite' so it is not needed to code the attribute 'Loop' is you want a non-stop scroll. Note: 'Loop' will be ignored if attribute 'Behavior' is coded. Also, if 'Behavior=Alternate' and 'Loop=2' then item will go from beginning of the Marquee to the end and back to the beginning, counting a round trip as 2 loops.

  • Alternate- Scrolls the text from right-to-left & goes back left-to-right.
Sets the background color of the marquee.
Sets the direction of the marquee box. Values are left, right, up, down where the value indicates the direction of travel. Direction=left therefore moves the text from right to left on the screen.
This sets how wide the marquee should be.
This sets how many times the marquee should 'Loop' its text. Each trip counts as one loop.
This is how many pixels the text moves between 'frames'. So scrollamount=1 gives the slowest scroll speed.
This sets the amount of time, in milliseconds, between 'frames'. Much like watching a replay of a video where every frame of the video would be paused for x number of miliseconds. So, 'Scrolldelay=1000' means a slow motion where every frame lasts one thousand miliseconds or one second.

A marquee element can contain arbitrary HTML, so in addition to text it could move one or more images, movie clips, or animated GIFs.


The marquee element was first invented for Microsoft's Internet Explorer and is still supported by it. Firefox, Opera, Chrome and Safari web browsers support it for compatibility with legacy pages. The element is non-compliant HTML. CSS properties are used to achieve the same effect as specified in the Marquee Module Level 3, which as of 2008 is in the call for implementations stage.[3] Similar effects can also be achieved through the use of JavaScript,[4] or CSS3 animations.

See also


  1. ^
  2. ^
  3. ^ CSS Marquee Module Level 3
  4. ^
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.