View Full Version : Changing link colors


Moonlit
07-05-2003, 10:14 PM
I've been having trouble changing the color of links when a mouse hovers over it. I've just been putting in
<style type="text/css">

A:link { text-decoration: none; color:#YourColor; }
A:visited { text-decoration: none; color:#YourColor; }
A:hover { text-decoration: none; color:#YourColor; }
</style>

...but Lissa's tutorial says to put this code in between the </title> and </head> tags. Where is that? I insert separate Html codes for everything on Geocities...

Lemon Squash
07-05-2003, 10:17 PM
Your supposed to start off with this..

<HTML>
<HEAD>
<TITLE></TITLE>
your css codes in here
</HEAD>
<BODY>
your html codes in here
</BODY>
</HTML>

o.O

Moonlit
07-06-2003, 12:06 AM
I'm not really clear on the difference between CSS and HTML

Kaliyoda
07-06-2003, 12:11 AM
It's all here.......

http://www.lissaexplains.com/css.shtml

Moonlit
07-06-2003, 12:23 AM
Yeah...I know, I've read all that, but it still looks like HTML to me...

marymaier1
07-06-2003, 12:27 AM
Just because it has the < and > symbols doesn't mean its HTML. The browser uses the same symbols, so different scripting languages wont look very different if you dont know what to look for. The difference is in the way its written and what its telling your browser to do.. (i think.. lol).

Moonlit
07-06-2003, 12:42 AM
Okay...that makes sense.

I still don't know how to change to link color on hover though. I don't know where to put

<style type="text/css">
A:hover { text-decoration: none; color:#7e4dff; }
</style>

...because nothing I do seems to work. (?)

Dude128
07-06-2003, 03:06 AM
Originally posted by Moonlit
I'm not really clear on the difference between CSS and HTML

basically, HTML is the markup that controls the page. the browser interprets it, and sets up the page and shows whatever you include in the code accordingly. CSS controls the styling of the page. it's designed to be separated from the atual content of the page (the HTML coding- it eliminates the need for the HTML attributes that set the look of the elements on the page) so that it can define the same style for all the elements that you specify (for example, you can have all your links have the same style), and so that it can be more easily modified- if correctly coded, you could completely change the look of your page just by changing the CSS at the beginning of the file or in a separate .css file.