coloring an anchor text

2 replies
  • WEB DESIGN
  • |
Hello:

Recently I put up a web site and put within it intext links using anchor text but the anchor text now shows in black and thus blends in with the other text.

How do I insert color code into the html code of each intext URL so that the anchor text shows in blue?

Thank you for the help
#anchor #coloring #text
  • Profile picture of the author aesoft
    Originally Posted by KingArthur View Post

    Hello:

    Recently I put up a web site and put within it intext links using anchor text but the anchor text now shows in black and thus blends in with the other text.

    How do I insert color code into the html code of each intext URL so that the anchor text shows in blue?

    Thank you for the help
    If you were to place it in your style sheet:
    Code:
    a { color:blue; }
    If you were to place it inline, then you would want to place style="color:blue;" within the anchor text element like so:
    Code:
    <a href="mydomain.com" style="color:blue;">My Link Text</a>
    You can find more helpful information here:
    CSS Styling Links

    One final thing to note, this is just a basic example. There could be other style declarations that could deter this from working properly without some troubleshooting.
    {{ DiscussionBoard.errors[3002105].message }}
  • Profile picture of the author promo_guy
    aesoft provides some good examples.

    Like aesoft says, it's hard to say exactly without seeing the code but, you could look for the a { code in your CSS stylesheet.

    If the links are black, depending if the anchor text is part of another CSS declaration, it probably looks like a {color: black;} or a {color:#000;} or even a {color:#000000;}

    So, if you wanted the anchor text blue, you could do something like:

    a {color:blue;} but that doesn't mean the hyperlink will be underlined, or the same color once clicked.

    What I usually determine is if I want the link to be underlined or not, or perhaps underlined once you hover over it.

    So, you could do something like:

    a, a:visited {color:blue; text-decoration:underline;}
    a:hover {text-decoration:none;}

    What this will do is: the first line will show hyperlink and the second line, when you hover over the link, will look like hyperlink

    Hope that helps

    Scott
    {{ DiscussionBoard.errors[3002706].message }}

Trending Topics