• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 199
  • Last Modified:

Changing link color

I should remember how to do this, but can't.

How with the following link html code, can I make the color of the link white without using the <body> tag or a css file.

<a href="weblink">link text</a>
0
PeterErhard
Asked:
PeterErhard
  • 3
  • 2
1 Solution
 
Khanh DoanSenior DeveloperCommented:
<BODY link="blue" alink="blue" vlink="violet">
alink="color"   For the active link color
vlink="color"   For the visited link color

or

<HEAD>
<STYLE type="text/css">
a.greenlink:link {color: #00a000;}
</STYLE>>
</HEAD>

<A href="somepage.html" class="greenlink">Visit Somepage</A>

Bonmat86.
0
 
Khanh DoanSenior DeveloperCommented:
I don't think you can change color name of the link without using <body> or css.
Bonmat86.
0
 
PeterErhardAuthor Commented:
Thanks for your response, but you missed this part in my question:

"without using the <body> tag or a css file"

I want it all contained within the <a href= statement.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
Khanh DoanSenior DeveloperCommented:
This is an<b onmouseout="this.style.color = 'black';" onmouseover="this.style.color = 'red';" align="justify"> example </b>of changing the color of text using a MouseOver.

Oh, you can use it. and use onclick even.
Bonmat86.
0
 
GrandSchtroumpfCommented:
<a href="weblink" style="color:white">link text</a>
0
 
GrandSchtroumpfCommented:
I guess the "link" meant the <a> element, not the ":link" pseudo-class.
Note that if you want to override inline styles, you can use "!important"
For example, this should make your white "link" red on hover:

a:hover {
  color: red !important;
}

<:°)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now