Ross Sheppard High School
Computer Programming 10
Student Learning Guide
Changing the Link Color


  When you have finished this project, you will be able to:
set the color of links

describe the following terms:

  • LINK
  • ALINK
  • VLINK
  1. You have learned that you can change the background color of your web page and the color of your text using the <BODY BGCOLOR> or the <FONT COLOR="#COLOR SPECIFICATION"> tags.

  2. As you complete this project, you will learn how to change the link and the link visited colors. Note, however, that people expect the link color to be blue and the visited link color to normally be purple. You should change the link and visited link colors only when it enhances the design of your web page or is required because the link and visited link colors can not be seen against your background. If the latter is the case - that is your background hides the link and visited link color - you may wish to change the background.

  3. Open your web page in NotePad.

  4. Find the <BODY> tag and insert the cursor just before the >.

    NOTE: Do NOT create a new BODY tag - there can be only 1 BODY tag on a Web page.

  5. The syntax for the link color is:

    LINK="COLOR SPECIFICATION"

    and for visited links:

    VLINK="COLOR SPECIFICATION"

    and for the active link (the one the mouse is over):

    ALINK="COLOR SPECIFICATION"

    The entire tag would be similar to:

    <BODY LINK="COLOR SPECIFICATION" VLINK="COLOR SPECIFICATION" ALINK="COLOR SPECIFICATION">

  6. Add the following tag into your BODY tag:

    <BODY LINK="RED" VLINK="GREEN" ALINK="CYAN">

  7. Save your file and view it in a browser.

  8. Notice the color of the links you created are now red. Visit one of your links, then return to your page. The visited link should now be green.

  9. You can use any of the HTML colors specifications for link and vlink.

  10. Click here to see the marking guide for this project.

  11. Save the project folder in your "Hand In" folder on your personal disk space so that this project can be graded..

  12. For the next project, you will learn how to add graphics and icons to your Web pages.


© 1998-2000 N.F. Mathew, EdD
File name: Lnkcolor.htm
Last updated on October 19, 2003
J. Heslinga, DTE