Adding Text with Special Effects to Your Web Page.

HTML home page

Adding a Marquee

When talking about HTML code a Marquee is text that starts at one part of the screen and floats across to the other side, a bit like the messages that advertise sales in the window of a shop. Internet Explorer lets you put marquees on your web page.

To create a Marquee type the code below in your test page exactly as shown, then save your work and return to this page to click on the TEST button:

<CENTER>
<MARQUEE WIDTH=25% HEIGHT=15 BEHAVIOUR=scroll DIRECTION=left LOOP=infinite BGCOLOR=yellow> Welcome to my Computer Page </MARQUEE>
</CENTER>

Click on this button to view your TEST page.

If you have followed the instructions carefully and typed the code exactly as shown, you should see text moving from the right of your screen to the left of your screen. But what does all this code mean and what if you want to make changes?

<MARQUEE> Begins the Marquee function and the function is closed in the usual manner by using the same tag (tags are also known as attributes) but with a forward slash at the beginning of it.

WIDTH refers to the width of the marquee, in the above example this has been set as equal to 25% which means 25% of the screen width. You can experiment with this later if you wish but for best effect set this a little longer than the text you wish to display where possible.

HEIGHT refers to the height of the Marquee background, this too should be a little larger than the text to be displayed.

BEHAVIOR (note the American spelling) this determines how the text to be displayed will behave and there are three possible options scroll, slide and alternate. Scroll is used when it is required for text to start at one side of the screen and disappear off the other. Slide for text that starts at one side of the screen and stops when it reaches the other. Alternate is used for text that starts at one side of the screen and bounces back when it reaches the other side.

DIRECTION this determines which direction the text starts from and this can be either left or right. An important point to note here is that the direction refers to which end of the text should be displayed first and not the direction that the text will travel.

LOOP, determines how many times the text will be displayed and here you can type in any full positive number of your choice, or the word infinite which means that the text will be displayed for as long as the page is viewed.

The next 2 tags have not been used in the example, the intention being to keep the example as simple as reasonably possible but feel free to experiment with these or indeed any of the tags/attributes.

SCROLLAMOUNT, determines the amount of space, in pixels left between each pass of the text.

SCROLLDELAY, determines the time in milliseconds, between each pass of the text.

BGCOLOR, determines the background colour for the text on display.

You can experiment with all of the above settings but don't forget to save the file first then refresh the browser (or click on the TEST button).

IMPORTANT point to note here, MARQUEE will NOT work with NETSCAPE. NETSCAPE has a BLINK function but this does not work with INTERNET EXPLORER. It is unfortunate but Microsoft (the owners of INTERNET EXPLORER) and NETSCAPE are archrivals and therefore some tags/attributes are not recognized by one or the other.

To try your text using the blink function type the code below in your test page.

<BLINK>Welcome to my Computer Page</BLINK>

Comments are used to make code or text invisible to visitors of a web page, if you are using NETSCAPE then there is little point having MARQUEE visible and if you are using INTERNET EXPLORER there is little point having BLINK text visible.

An opening comment looks like this

And a closing comment looks like this

To make use of comments you simply place the code you do not want to use between the opening and closing comments as shown below.

<!-- BLINK>Welcome to my Computer Page</BLINK -->

In this way the code will not be used or seen by your visitors but it would be a simple matter to activate the code if required by removing the comments.

[ TOP ] [ Click here to start the next stage. ]

© Copyright 2002 Able2translate All rights reserved.