How to change the color of a single link?

Asked

Viewed 48,943 times

2

How to change the color of a single link?

I’ve tried to go on "Modify - Page properties - Links", however the settings that are put there go to ALL links, and is not what I want on my site.

  • 2

    It can be by the tab Code?

  • How about straight through HTML: <a href="http://www.google.com" style="color: #4272DB">Google</a>

  • If it can’t be by the tab code as @Gypsy suggests, the question is off-topic.

2 answers

5

You can go directly in the style of the link:

<a href="#" style="color: #F00">teste</a>

5

Build a css selector that reaches only the link you want to color, and create the following rule in your CSS:

seu-seletor {
    color: #f00; /* vermelho - troque para a cor que quiser */
}

The shortest way is to put a unique ID on the link, and create a selector accordingly. For example, a link like this:

<a href="#" id="meulink">Bla bla bla</a>

requires a selector like this:

#meulink { color: #f00; }
  • I thank everyone who answered. After some study I was able to edit my link. I’m new to Stackoverflow and the next answer was the last one! I was having trouble creating a css style and then applying it. Once created, I didn’t know how to use.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.