Marquee element
   HOME

TheInfoList



OR:

The marquee tag is a non-standard
HTML Hypertext Markup Language (HTML) is the standard markup language for documents designed to be displayed in a web browser. It defines the content and structure of web content. It is often assisted by technologies such as Cascading Style Sheets ( ...
element which causes text to scroll up, down, left or right automatically. The tag was first introduced in early versions of
Microsoft Microsoft Corporation is an American multinational corporation and technology company, technology conglomerate headquartered in Redmond, Washington. Founded in 1975, the company became influential in the History of personal computers#The ear ...
's
Internet Explorer Internet Explorer (formerly Microsoft Internet Explorer and Windows Internet Explorer, commonly abbreviated as IE or MSIE) is a deprecation, retired series of graphical user interface, graphical web browsers developed by Microsoft that were u ...
, and was compared to
Netscape Netscape Communications Corporation (originally Mosaic Communications Corporation) was an American independent computer services company with headquarters in Mountain View, California, and then Dulles, Virginia. Its Netscape web browser was o ...
's blink element, as a proprietary non-standard extension to the HTML standard with usability problems. The
W3C The World Wide Web Consortium (W3C) is the main international standards organization for the World Wide Web. Founded in 1994 by Tim Berners-Lee, the consortium is made up of member organizations that maintain full-time staff working together in ...
advises against its use in HTML documents.


Usability problems

Marquee can be distracting because the human eye is attracted to movement, and marquee text is constantly moving. As with the blink element, marquee-tagged images or text are not always completely visible on rendered pages, making printing such pages an inefficient (if not impossible) task; typically multiple attempts are required to capture all text that could be displayed where messages scroll or blink. 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,
client-side scripting A dynamic web page is a web page constructed at runtime (during software execution), as opposed to a ''static web page'', delivered as it is stored. A server-side dynamic web page is a web page whose construction is controlled by an application ...
allows marquees to be programmed to stop when the mouse is over them.


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" if 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. ;bgcolor: Sets the background color of the marquee. ;direction: 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. ;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 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 milliseconds. "Scrolldelay=1000" means a slow motion where every frame lasts one thousand milliseconds 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
GIF The Graphics Interchange Format (GIF; or , ) is a Raster graphics, bitmap Image file formats, image format that was developed by a team at the online services provider CompuServe led by American computer scientist Steve Wilhite and released ...
s.


Implementation

The marquee tag has been deprecated in most browsers, but the same behavior can still be implemented with Cascading Style Sheets, like this: @keyframes marquee .marquee-container .marquee-content The animation, marquee, is defined by its @keyframes to be a simple translation from right to left; it would be possible to reverse the animation by inverting it (from -100% to 100%, for example). The 10s can also be modified to alter its output. The style can then be invoked in HTML:
The freakin' geese are on the lease!


Compliance

The marquee element was first invented for
Microsoft Microsoft Corporation is an American multinational corporation and technology company, technology conglomerate headquartered in Redmond, Washington. Founded in 1975, the company became influential in the History of personal computers#The ear ...
's
Internet Explorer Internet Explorer (formerly Microsoft Internet Explorer and Windows Internet Explorer, commonly abbreviated as IE or MSIE) is a deprecation, retired series of graphical user interface, graphical web browsers developed by Microsoft that were u ...
and is supported by it.
Firefox Mozilla Firefox, or simply Firefox, is a free and open-source web browser developed by the Mozilla Foundation and its subsidiary, the Mozilla Corporation. It uses the Gecko rendering engine to display web pages, which implements curr ...
, Chrome and
Safari A safari (; originally ) is an overland journey to observe wildlife, wild animals, especially in East Africa. The so-called big five game, "Big Five" game animals of Africa – lion, African leopard, leopard, rhinoceros, African elephant, elep ...
web browsers support it for compatibility with legacy pages. The element is non-compliant
HTML Hypertext Markup Language (HTML) is the standard markup language for documents designed to be displayed in a web browser. It defines the content and structure of web content. It is often assisted by technologies such as Cascading Style Sheets ( ...
. CSS properties were proposed to achieve the same effect as specified in the Marquee Module Level 3, which was abandoned without implementation in 2014. Similar effects can also be achieved through the use of
JavaScript JavaScript (), often abbreviated as JS, is a programming language and core technology of the World Wide Web, alongside HTML and CSS. Ninety-nine percent of websites use JavaScript on the client side for webpage behavior. Web browsers have ...
, or CSS3 animations.liMarquee - alternative marquee jQuery plugin.
Creates horizontal or vertical marquee for text, images, goods, banners or logos


References

{{Reflist HTML tags Articles containing video clips Web 1.0