Jump to content

HTML code for changing link colour?


byron2k12

Recommended Posts

I have used google search, only problem is that i am using code to create links "without" underlines at the moment, this is the html i am using for that:

<p><a href="http://examplelink.com" style="text-decoration: none">Example Text</a></p>

 

It works great but when i try to implement html link-colour codes for that, i get nothing. Can anyone help, thanks.

Link to comment
Share on other sites

Try using styles in the head of your HTML document or put them in a desperate file and link that to your document.

 

In head of file:

<style type="text/css">
a { 
text-decoration:none;
color:#cc0000;
}
</style>

 

Make sure in your CSS your are spelling colour as color. The American way.

Link to comment
Share on other sites

When using inline CSS make sure you are ending each statement with a semicolon.

 

<a href="#" style="text-decoration:none;color:#000000;">Link</a>

 

However. If you are going to be using the same style on a number of different anchor links and or on a number of pages, it is best to use external style sheets.

Link to comment
Share on other sites

  • 4 weeks later...

I have used google search, only problem is that i am using code to create links "without" underlines at the moment, this is the html i am using for that:

<p><a href="http://examplelink.com" style="text-decoration: none">Example Text</a></p>

 

It works great but when i try to implement html link-colour codes for that, i get nothing. Can anyone help, thanks.

lets see the code that doesnt work.

Link to comment
Share on other sites

  • 2 weeks later...
  • 4 weeks later...
  • 2 months later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.