Rainbow Links

Would you like to add a little flair to your pages? If so, this tutorial will show you how to make your page links automatically radiate rainbow colors.

This script is very easy to use. All you have to do is to add the script to the <head>...</head> tag pair in your HTML source code or save it as a javascript file and link to it on all of the pages you want it to work on.

One good thing about this script is that it can also be used with other text like paragrapghs and titles (pass your cursor over this paragraph to see this effect). Simply add 'onmouseover="doRainbow();"' and 'onmouseout="stopRainbow();"' to the target tags.

Highlight The Source Code Below

The Script

Highlight The Source Code Below

The best thing to do here is to copy the script source above into a text or HTML editor. The click on FILE/SAVE AS to save it as a javascript file such as "rainbow.js". Then link to it on the pages you want it to have an effect on your links. Copy the source below to link to this file. Add the following to the <head>...</head> tag pair in your HTML source code.

Highlight The Source Code Below

TIP: If there are any links that you don't want to radiate these colors you can put the <font>...</font> tag pair inside the link. This turns the rainbow colors off. Below are 3 links. Pass your cursor over the links and you'll notice the last one "Fox News" doesn't have rainbow colors.

CNN | MSNBC | FoxNews

This will work wherever there is text. The source code below is for the links. Try passing your cursor over various parts of the form below to see what I did. Although I had to use onmoseover and onmouseout to make it happen.

Highlight The Source Code Below



<<< Back



Home Page       This Page Was Last Updated: