Solved

Changing link color

Posted on 2006-06-20
6
194 Views
Last Modified: 2008-03-06
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
Comment
Question by:PeterErhard
  • 3
  • 2
6 Comments
 
LVL 10

Expert Comment

by:Khanh Doan
ID: 16948537
<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
 
LVL 10

Expert Comment

by:Khanh Doan
ID: 16948541
I don't think you can change color name of the link without using <body> or css.
Bonmat86.
0
 

Author Comment

by:PeterErhard
ID: 16948542
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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 10

Expert Comment

by:Khanh Doan
ID: 16948546
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
 
LVL 30

Accepted Solution

by:
GrandSchtroumpf earned 500 total points
ID: 16948929
<a href="weblink" style="color:white">link text</a>
0
 
LVL 30

Expert Comment

by:GrandSchtroumpf
ID: 16949733
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Create CSS Animation for Page Transitions 4 38
Increase the size of the modal in Bootstrap 5 42
Select case on click 3 19
Filktering Alphabetically 8 28
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question