Solved

Changing link color

Posted on 2006-06-20
6
193 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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

810 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