Marquee tag
Encyclopedia
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. It is deprecated by the W3C and not advised by them for use in any HTML documents.
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. To negate this problem, webpage designers should only use the tags to move text or images in ways that keep them always visible (like using the behavior="alternate" version of marquee which just makes text jitter back and forth but does not obscure any part of it if scrolling widths are set correctly, or using blink only on words that capture attention, but don't truly relay anything so important it can't be figured out from context (like flashing the word NEW! in front of a new item on a page).
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. 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 (usually with a simple
Align: Uses the same syntax as the img element.
Behavior: Allows the user to set the behavior of the marquee to one of three different types:
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.
Bgcolor: Sets the background color of the marquee.
Direction: Sets the direction of the marquee box to either
Width: This sets how wide the marquee should be.
Loop: This sets how many times the marquee should 'Loop' its text. Each trip counts as one loop.
Scrollamount: This is how many pixels the text moves between 'frames'. So scrollamount=1 gives you the slowest scroll speed.
Scrolldelay: 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.
(Note: Marquee can have not just text but just about any package of item(s) such as one or more images or movie clips or animated GIFs.)
'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 is in the call for implementations stage. Similar effects can also be achieved through the use of JavaScript
.
HTML
HyperText Markup Language is the predominant markup language for web pages. HTML elements are the basic building-blocks of webpages....
element which causes text to scroll up, down, left or right automatically. The tag was first introduced in early versions of Microsoft
Microsoft
Microsoft Corporation is an American public multinational corporation headquartered in Redmond, Washington, USA that develops, manufactures, licenses, and supports a wide range of products and services predominantly related to computing through its various product divisions...
's Internet Explorer
Internet Explorer
Windows Internet Explorer is a series of graphical web browsers developed by Microsoft and included as part of the Microsoft Windows line of operating systems, starting in 1995. It was first released as part of the add-on package Plus! for Windows 95 that year...
, and was compared to Netscape
Netscape (web browser)
Netscape 7 was a series of proprietary cross-platform Internet suites created by Netscape Communications Corporation and then in-house by AOL to continue the Netscape series after Netscape 6. There were three main editions released from the Netscape 7 series; being Netscape 7.0, 7.1 and 7.2...
's blink element, as a proprietary non-standard extension to the HTML standard with usability problems. It is deprecated by the W3C and not advised by them for use in any HTML documents.
Usability problems
Marquee is distracting. The human eye is attracted to movement, 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. To negate this problem, webpage designers should only use the tags to move text or images in ways that keep them always visible (like using the behavior="alternate" version of marquee which just makes text jitter back and forth but does not obscure any part of it if scrolling widths are set correctly, or using blink only on words that capture attention, but don't truly relay anything so important it can't be figured out from context (like flashing the word NEW! in front of a new item on a page).
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. This can easily frustrate users. To combat this, most client-side scripting
Client-side scripting
Client-side scripting generally refers to the class of computer programs on the web that are executed client-side, by the user's web browser, instead of server-side...
allows marquees to be programmed to stop when the mouse is over them (usually with a simple
onmouseover="this.stop;"
command). Good design keeps links and critical information out of scrolled texts or puts another static copy of each somewhere else always onscreen and keep scrolls with links (like site or general news updates) very brief (not more than two or three virtual screen lengths maximum at a good speed like the default of 10) so that they repeat quickly. Also, scrolling text too fast can make it unreadable to some people, particularly those with visual impairments. Speed settings above default should be avoided for relaying readable text. There are many legitimate reasons to use or avoid use of the marquee tag. Web authors need to have the good sense to know when either case is present.Attributes
Unlike its blinking counterpart, the marquee element has several attributes that can be used to control and adjust the appearance of the marquee.Align: Uses the same syntax as the img element.
Behavior: 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.
Bgcolor: Sets the background color of the marquee.
Direction: Sets the direction of the marquee box to either
left
-to-right, right
-to-left, up
-to-down and down
-to-up.Width: This sets how wide the marquee should be.
Loop: This sets how many times the marquee should 'Loop' its text. Each trip counts as one loop.
Scrollamount: This is how many pixels the text moves between 'frames'. So scrollamount=1 gives you the slowest scroll speed.
Scrolldelay: 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.
(Note: Marquee can have not just text but just about any package of item(s) such as one or more images or movie clips or animated GIFs.)
Compliance
The marquee element was first invented for MicrosoftMicrosoft
Microsoft Corporation is an American public multinational corporation headquartered in Redmond, Washington, USA that develops, manufactures, licenses, and supports a wide range of products and services predominantly related to computing through its various product divisions...
's Internet Explorer
Internet Explorer
Windows Internet Explorer is a series of graphical web browsers developed by Microsoft and included as part of the Microsoft Windows line of operating systems, starting in 1995. It was first released as part of the add-on package Plus! for Windows 95 that year...
and is still supported by it. Firefox
Mozilla Firefox
Mozilla Firefox is a free and open source web browser descended from the Mozilla Application Suite and managed by Mozilla Corporation. , Firefox is the second most widely used browser, with approximately 25% of worldwide usage share of web browsers...
, Opera
Opera (web browser)
Opera is a web browser and Internet suite developed by Opera Software with over 200 million users worldwide. The browser handles common Internet-related tasks such as displaying web sites, sending and receiving e-mail messages, managing contacts, chatting on IRC, downloading files via BitTorrent,...
, Chrome
Google Chrome
Google Chrome is a web browser developed by Google that uses the WebKit layout engine. It was first released as a beta version for Microsoft Windows on September 2, 2008, and the public stable release was on December 11, 2008. The name is derived from the graphical user interface frame, or...
and Safari
Safari (web browser)
Safari is a web browser developed by Apple Inc. and included with the Mac OS X and iOS operating systems. First released as a public beta on January 7, 2003 on the company's Mac OS X operating system, it became Apple's default browser beginning with Mac OS X v10.3 "Panther". Safari is also the...
web browsers support it for compatibility with legacy pages. The element is non-compliant HTML
HTML
HyperText Markup Language is the predominant markup language for web pages. HTML elements are the basic building-blocks of webpages....
. CSS
Cascading Style Sheets
Cascading Style Sheets is a style sheet language used to describe the presentation semantics of a document written in a markup language...
properties are used to achieve the same effect as specified in the Marquee Module Level 3, which is in the call for implementations stage. Similar effects can also be achieved through the use of JavaScript
JavaScript
JavaScript is a prototype-based scripting language that is dynamic, weakly typed and has first-class functions. It is a multi-paradigm language, supporting object-oriented, imperative, and functional programming styles....
.
See also
- Blink element
- HTML elementHTML elementAn HTML element is an individual component of an HTML document. HTML documents are composed of a tree of HTML elements and other nodes, such as text nodes. Each element can have attributes specified. Elements can also have content, including other elements and text. HTML elements represent...
- Comparison of layout engines (Non-standard HTML)Comparison of layout engines (Non-standard HTML)The following tables compare deprecated and proprietary HTML elements and attributes compatibility and support for a number of layout engines. Please see the individual products' articles for further information. This article is not all-inclusive or necessarily up-to-date...