View Full Version : How do I make my links change a color other than the default one after clicking

10-21-2002, 06:33 AM
Hi I have some links on my page that are blue. When you click a link, go to the site, then return to my page, the link is now purple.
How do I make it white? Pretty simple, I know... sorry :)

I just finished my 1st site. Just nitpicking.


10-21-2002, 06:46 AM
place these in your <body> tag


Example: <body link="blue" alink="blue" vlink="blue">

link specifies the color of your hyperlink
alink is the active link
and vlink is the color of the visited link, the color after you have been to that page

to change the color of the link while your mouse is over it or hover link you will need CSS

place this in your <head></head> tag

<style type="text/css">

there is alot more you can do with hyperlinks, if you want to know just ask :)

10-21-2002, 12:41 PM
The link, vlink and alink attributes are deprecated; if you're going to use CSS (which is a great idea!), might as well use it for the other color settings, too:

<style type="text/css">
a:link {color: blue}
a:visited {color: green}
a:hover {color: red}
a:active {color: red}
Colors chosen are of course completely arbitrary. By the way: the order in which the pseudo-classes (because that's what they are) are given here is the correct one; :hover should follow :link and :visited, and :active should follow :hover.

10-21-2002, 02:54 PM
Thank you. :)

10-21-2002, 04:27 PM
Just a note, better to use the HEX values over words when specifying the colours

...color: black

...color: #000000


And if you want an easy CSS program, it's free.

Called "Topstyle" :)

10-21-2002, 08:31 PM
hex values are better for specifying a more exact color you want
words are mostly used for older browsers
check this out: http://www.cg9com.web1000.com/colortable.htm

10-21-2002, 09:11 PM
Actually, color names generally don't make any difference.

The HTML specification has I believe 16 color keywords. In practice, there are a bunch that browsers accept, and these are valid in the SVG specs.

Currently, you can define colors in several ways:

which is converted to #rrggbb --> #123 == #112233
rgb(r, g, b)
where r, g, and b are in the domain of [0, 255]
rgb(r%, g%, b%)
where r, g, and b are in the domain of [0, 100]

Also, "transparent" is a valid color keyword.

When CSS3 gets to candidate recognition, you'll also have these color types to wield:

hsl(hue, sat, light)
where hue is [0, 360], and sat and light are [0%, 100%]
rgba(r, g, b, a) where r, g, and b are the same before (0-255 or 0%-100%) and a is [0, 1] and represents the alpha channel value of the color.
hsla(h, s, l, a)
where h, s, and l are the same as before, and a is [0, 1] and represents the same as it does in rgba()

I hope that clears up some confusion. :)
(Or added to it, muahahaha :cool: )

10-21-2002, 09:53 PM


10-21-2002, 11:29 PM
What application does : transparent have?

10-22-2002, 01:24 AM
Basically explicitly declaring a background to be transparent. By default, they should be anyway...

10-22-2002, 03:04 AM
What do you mean by transparent? Do you mean that it would automatically lie behind any content?

On my site....my site (http://www28.brinkster.com/loststudios)
I want to make the white background around the grey rectangle link bar black (the skinny are of white around it on the left). Also, the white horizontal area above the headings and text of each page black (the area directly below my nav bar.)

Basically...All I need to know is how to get the background color to not be behind the text...(the whole table it's in in DW)



10-22-2002, 05:15 AM
you dont have to cross questions :)

perhaps you should read a few tutorials

10-22-2002, 05:15 AM
oOOoh senior member status

i feel old, where are my discounts! :cool:

10-22-2002, 06:49 AM
sorry about crossing questions...I just thought my post in General web building was getting off topic so I thought I should post the same in the correct forum.

Which tutorial has what I am looking for... (background color question)?


10-22-2002, 04:25 PM
I think you should start with some beginner stuff.
learn the basis of html.
your website looks great, but you seem to be lacking some knowedge on the basics.

your html says:
<body link="black" alink="blue" vlink="black">
<body bgcolor="#CCCCCC" (ect.)

two open body tags is one too many.
and you havnt specified a text color.