Links

Section 1 - Introduction
Section 2 - Basics
      Your first page
      Formatting
      Text tricks
      Pictures
      Links
      Backgrounds
         Color tutorial
         Background Color
         Background Pictures
         Text Color
         Font
         Link Colors
         Text Decoration
         You Try It
Section 3 - Next Level
Section 4 - Advanced
Section 5 - Publishing
Section 6 - Extras
Appendices
Link colors
It is possible to make the links on your page colors other than that vivid blue. You may have noticed that most of the links on this page are green and they turn light green when the mouse is moved over them. Unless you tell the document otherwise, the links are blue and they turn red when you mouse-over them. Sometimes they turn purple if you've already used them.

Not anymore! You can get those colors to be whatever you'll like them to be. It's much easier to change the entire document at once. Here's how it's done.
<body link="#cccc00"> </font>
Now, all of your links will be yellow instead of blue.
Code
<body link="cccc00">
<a href="http://www.w3schools.com/">
HTML is cool.
</a>
</body>
What you see

HTML is cool.
You can also change what colors the links turn when you move the mouse over them. Here's want a link normally loods like:
Link
If you move the mouse over it, you'll notice it turns red. This is the default, but you can make the color anything you'd like. Again, this is done in the </body> tag and you can use these commands together. The command looks like:
<body link="#cccc00" alink="green"> </font>
This time, the link will be yellow, but when you move your mouse over it, it will turn green. The "A" stands for "active," and this is the code to change the color of on active link. Notice that the link color is alos present. Here's the code.
Code
<body link="cccc00" alink="green">
<a href="B6.html#f">
This link goes nowhere
</a>
</body>
What you see

This link goes nowhere
There's one more bit of code that you can use in the <body> tag to change the link appearance. Sometimes, after you click a link, it changes color and stays the new color. There is an example below.
After you click, the color changes.
Once you've clicked on a link, it is known as a "visitied link." You can make a visited link any color you'd like too. Here's the code:
<body link="blue" alink="red" vlink="green">
By using all three of these tags together, you can make the links a bunch of great colors. A warning though - please don't make a visited link blue if you have an active purple link. That's just cruel to those who are used to the standard methods.

You may have noticed that I have several different colored links on this page. You will learn this later on, but it's more advanced than the basics. One thing at a time, right?
Back Home Forward