Thursday, January 04, 2007

How to change the color of your hyperlink

Someone commented in blog Blogger for Dummies and I went to his site Dogs Puppies Training and Care by Kevin the Collie. I noticed in his header a link which was in dark blue which merged into the dark green background and thus became almost invisible. I don't know if the color was controlled by the CSS (Cascading Style Sheet) or not, but in any case, if you want a link to be of a certain color, you should write the link in the following way (assuming you want it to be in red): <a href="URL><span style="color:red;">description</span></a>.

Update: Someone asked whether it is possible to post things other than hyperlinks in color. Sure. Just enclose the text with the <span style="color:red;"> and </span> tags. For example you want these text to be in green, just put <span style="color:red;"> in front of "these" and </span> after "green"

  NEWER POST    HOME  OLDER POST

9 comments:

  1. Anonymous1/04/2007

    Hi Peter

    Thanks very much for your help with the link on my blog. It had been nagging away at me for ages, but I fixed it in less than a minute after you told me how!
    Kevin the Collie

    ReplyDelete
  2. Anonymous1/05/2007

    Thanks. Is there any way to make normal text in color? It's a part of my template, not an individual post (the part at the top of my blog that says "If you like what you say, post a comment). Thanks in advance!

    ReplyDelete
  3. Sure. I can't answer in the comments section as many HTML characters are not allowed. I have answered your query in an update in this post.

    Peter aka Enviroman
    Enviroman Says

    ReplyDelete
  4. Hi Peter! You have a very useful Blog here and i come here often. I have a problem with link and while i was searching i found your post. If you look at the blog posts you would notice that the post text color and links color are the same on my Blog. With this template the colors and font things do not work and hence i cannot change the link color. Please advice on how i can change the link color to brown or blue which i think would compliment the blog relationships-love-marriage-articles.blogspot.com

    ReplyDelete
  5. Did you do what is described in this post? What we did here is inline CSS which has the highest priority which means it overrides everything including what may be in the template, so I will be very surprised if you did what is described here and it didn't work:

    Priority higher down the list:
    Browser default
    External style sheet
    Internal style sheet (in the head section)
    Inline style (inside an HTML element)
    So, an inline style (inside an HTML element) has the highest priority

    ReplyDelete
  6. Can you tell me how to set up multiple css link styles? I want the links in the sidebar and in the blockquote to be a different color than the links in the rest of the design. I have tried and tried but any changes I make seem to affect all links.

    I appreciate your help.

    ReplyDelete
  7. forgot to select "follow-up comments". :)

    ReplyDelete
  8. Not sure if inline CSS might work, for example, <a href="URL" style="color:red;">anchor text>

    ReplyDelete
  9. But I personally would prefer links to be colored blue as people are used to associate that color with hyperlinks

    ReplyDelete

Find help, info, instructions, tips, tricks

Tip: Use search box below or this box, labels in the first right sidebar, archive, ctrl+F for this page or sitemap to find topics