How to make HTML links in different colors
How can I make the HTML links in different colors?
Please advise the easiest way to do it as I am totally clueless about it.
Thanks!
How can I make the HTML links in different colors?
Please advise the easiest way to do it as I am totally clueless about it.
Thanks!
You can make HTML links in different colors by 2 ways.
1. Using HTML Code
2. Using CSS Code
1. Using HTML Code
In your <BODY> tag just type the following HTML code
<body link="#FF00FF" alink="#00FF00" vlink="#0000FF">
You can use color name or hexadecimal code
Link shows the color value you want to apply to the unselected links on your page.
Alink shows the color value you want to apply to active links on your page.
Vlink shows color value you want to apply to the previously visited links on your page.
2. Using CSS Code
You can use the CSS code
Body(font-family: “Arial”, “Verdana”)
A:link { color: #FF00FF}
Normally in an HTML webpage, setting the colors are normally done within the CSS file. The colors are applied using the properties “background-color” and “color”. These properties are normally written in these formats:
If you have no idea how to get the value “#000” for a specific color, you can use Adobe Photoshop. Here’s an example using Adobe Photoshop CS2. Start Adobe Photoshop CS2 and then pick a color in Swatches tab. See image.
Once you select a color, it will appear on the left panel. On the left panel or sidebar, click on the color you selected. See image.
Move the slider up or down to adjust the color. You can also move the small circle in the display box to adjust the color. See image.
Once the color has been decided, copy the numbers or the value next to “#”. You can use this value in applying the color for your hyperlinks or in the body of the webpage. See image.
“#000” or “#000000” is equivalent to black and “#ffffff” for white.