You are here:   HomeHTML LanguageHTML TutorialHTML MARQUEE
by Dinesh Thakur Category: HTML

This tag is used to scroll text horizontally across the screen. It is mainly used to deliver a specific message to the visitor or to scroll Ads on a page. It is not a standard HTML tag and so the browser support for it is typically limited to Internet explorer.


The following lines of codeshow the use or marquee tag:









The following code is displayed in which the text within the <MARQUEE>and </MARQUEE> tags scrolls across the screen from right to left. But by including the attribute direction="right" in marquee tag code changes the direction of flow of text i.e left to right.

By including the attribute direction="up" in marquee tag of code changes the direction of flow of text from bottom to top and direction=" down" changes the flow of text from top to bottom.

















Attributes used in <MARQUEE> tag


Attribute               Possible values                                    Functional


Bgcolor                  Anv standard color name          Specifies the background color of the marquee.

     or hexadecimal color value


Direction                Left, Right                               Specifies the direction in which the marquee contents Scrolls


Height                    Any valid percentage or            Specifies the vertical dimension of the marquee

     no. of pixels                          


Behavior                Scroll, Slide, Alternate              Sets the behavior of marquee to one of following:

   Scroll: Text scrolls like a stock ticker.

   Slide: Text slides into view.

   Alternate: Text alternates between scrolling  and  sliding.


Width                   Any valid percentage or             Specifies the horizontal dimension of the marquee

no. of pixels


Hspace                Any valid percentage or              Specifies the left and right margin of the marquee

no. of pixels


Vspace                Any valid percentage or               Specifies the top and bottom margin of the marquee

no. of pixels


Loop                   Any positive integer of                  Controls the number of appearance of the marquee

INFINITE                                               content


Scrollamount       Number of pixels                         Specifies the shift of marquee text


Scrolldelay          Number specifying the                 Specifies how often the marquee text redraws

delay in milliseconds

About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular Computer Notes blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to contact us.

What's New and Popular

Search Content

Advance Courses

Basic Courses

Advertise with Us