General Question

gambitking's avatar

How do i change the color of a hyperlink with in-line CSS?

Asked by gambitking (4196points) April 16th, 2010

I don’t want this ugly baby blue link, I want it red, like my site logo. How am I supposed to change the color using inline CSS?

Observing members: 0 Composing members: 0

5 Answers

erichw1504's avatar

<a style=“color:#000000” href=“http://www.google.com” >Link Text</a>

For the color you can put the name (green, red, etc…) or use hexadecimal.

MrItty's avatar

If you want to change the color of all the links on the page, put it in the <style> tag in the header. You can also change the colors depending on whether the link is visited, unvisited, active, or being hovered over. (I don’t know how to set those qualifications if you’re doing it on one specific link in a style attribute).

<style type=“text/css”>
a:link {color:#FF0000;} /* unvisited link */
a:visited {color:#00FF00;} /* visited link */
a:hover {color:#FF00FF;} /* mouse over link */
a:active {color:#0000FF;} /* selected link */
</style>

http://www.w3schools.com/css/css_link.asp

erichw1504's avatar

@MrItty Yea, when I learned how to use that when I first starting creating webpages, it was amazing.

gambitking's avatar

@erichw1504 thanks that’s what I needed!
@MrItty good tips, good stuff but I’m only needing the one color on that one link, thanks though.

Response moderated

Answer this question

Login

or

Join

to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther