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>
PeterErhardAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
GrandSchtroumpfConnect With a Mentor Commented:
<a href="weblink" style="color:white">link text</a>
0
 
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
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

 
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
 
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:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.