Sunday, November 21, 2010

How to make my link appear white using HTML? And how to make it appear gray after visited?

Hello, I'm a little rusty in the HTML department and I'm trying to help a friend format his website. We've got a list of links on the main page (all to internal documents if that makes a difference) and they are appearing in default blue. We want them to appear white and, after they are clicked, to appear gray. Hover features are not necessary. I've tried several things and none worked. I'm using Firefox and Notepad. Help!How to make my link appear white using HTML? And how to make it appear gray after visited?
If you want to change the link color on your page, you will need to begin by finding the %26lt;body%26gt; tag. Now look for a command after the word body that says link=';color';. It would look like this:



%26lt;body link=';blue';%26gt;



Or the tag might have some other commands as well:



%26lt;body bgcolor=';#000000'; text=';#FFFFFF'; link=';#0000FF';%26gt;



You may also just have the word body with nothing else there. If so, add the command after the word body, with a space between the two, like this:



%26lt;body link=';blue';%26gt;



Now, to change the link color, you replace the word blue inside the quotes with a different color name or hex code. For a list of some common color names and hex codes, click here.



So, if you would like to change the link color to red, you would type the following:



%26lt;body link=';red';%26gt;



Or using the hex code:



%26lt;body link=';#FF0000';%26gt;



Now, all the links on your page will be colored red rather than blue. You can also do the same things for active and visited links by adding or editing their commands. The commands are:



alink=';color'; For the active link color

vlink=';color'; For the visited link color



You might have:



%26lt;body link=';blue'; alink=';blue'; vlink=';violet';%26gt;



To change the other colors, do the same as you did for the link color. If you need to add the commands, go ahead. Just place a space between each command, and add your colors!How to make my link appear white using HTML? And how to make it appear gray after visited?
at the top of the page, inside you %26lt;head%26gt; and %26lt;/head%26gt; tags (or in your css file if you're using an external stylesheet):



%26lt;style type=';text/css';%26gt;

a:link {

color:#ffffff;

}

a:visited {

color:grey;

}

%26lt;/style%26gt;

No comments:

Post a Comment