,

How to change color of hyperlinks in 3 easy ways

   

Changing the colour of your hyper links is something that you might need to do sometimes as a Blogger or web designer and this is something that can be done in a variety of ways. A person can either specify an inline style, make an external style sheet or specify the colour change in their own style sheet. By using any three of these methods a person can very easily change the colour of their hyperlinked URLs. So without wasting much time let us tell you how to change the color of hyperlink URL.

Steps to change color of Hyperlink or URL

1.) To change the colour of your hyperlink using inline styles you can use the following code example:

<a href="this-is-simple-test.php" style="color: #27bad9">This is a simple test</a>

The output of the above code would come out as follows:

This is a simple test

2.) To change the colour of your hyperlink URL using internal CSS code you can do the following, i.e. use the following code example:

<head>
<style>
a:link {
color: #27bad9;
}
a:visited {
color: #cc0000;
}
a:hover {
color: #eeeeee;
}
</style>
</head>

The output for the above code will be visible if you paste it into the head section of the your’s website’s HTML code.

You can change the above color codes as required by you in order to have custom colour on hover as well as custom initial colour for your hyperlinks. When you have to make sure the code works on mutiple pages at once then this method won’t work well and using an external style sheet at that time is recommended for maintaining the same style throughout the pages.

See more: How to setup short domain for WordPress posts

3.) To change the colours of your URLs or hyperlinks using an external style sheet use the below code example:

a:link {
color: #000000;
}
a:visited {
color: #cc0000;
}
a:hover {
color: #27bad9;
}

Add the above code into your Style.css file or any other external stylesheet file in order to make sure the code gives you different coloured hyperlinks and you can change the colour codes according to your own preference.

NOTE: A great benefit of using external stylesheet files is that the properties of all the hyperlinks can be controlled from a single place with ease and you can achieve really cool hover effects and change colours of the links when visited.

This was all regarding how to change colour of your hyperlinks on the web, to change colour of hyperlinked text in a word file or document you need to do it differently which we will cover in a separate link later on.

Keep visiting for more awesome how to guides, blogging tips, gadget reviews, tech news and remember we cover,
“Everything under the Sun!”

inspire2rise mascots - cowboys

Follow Inspire2rise on Twitter. | Follow Inspire2rise on Facebook. | Follow Inspire2rise on Google+.

Stay Inspired to rise fellas!

Read more:

 

 

 

 

Written by Aditya Nath Jha

Aditya Nath Jha is an Engineer from New Delhi, India. His areas of interest include Gadgets, WordPress, speed optimization & latest technology.
When he is not busy blogging he loves to write poetry, compose his own songs and has a taste for music! Find me on Facebook, Google +, Twitter, Linked in.
And watch my videos on Youtube.

Comments

Leave a Reply
  1. Hello Aditya,

    I am glad to finally interact with you here!

    I am a complete coding noob and such coding tips are meant a world for me! Thanks for it, I gotta try them out on my blog!

    See me often!

    ~ Adeel Sami

  2. Good article!
    It was a reminder for me to go through the style sheet of my site again, looking for stuff that I forgot.
    Guess what: I forgot to link my logo to the homepage.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Loading…

Facebook Comments

How to record screen on Windows using VLC

How to record screen on Windows using VLC

Buying refurbished or used goods, head to TogoFogo

Buying refurbished or used goods, head to TogoFogo