Jump to content


This topic is now archived and is closed to further replies.


Changing the colours of my links.

Recommended Posts

I am using a html file to display the menu for my webpage. The problem i am having is that i cant seem to change the colours of my links. Here's the code. Can't see what i am doing wrong???



<body background="file:///C|/Project/htdocs/blue.jpg" link="red">

<img src="C:\Project\htdocs\Logo.jpg" height='100', width='150'><br>

<br><b><a href="Home.html" style="text-decoration:none" target="mainpage">Home</a><br><br>



Share this post

Link to post
Share on other sites
This is not a PHP question, this should be posted in the HTML or CSS section.

You should be using CSS style sheets to affect the output of your html.

In the "<head>" section of your HTML, you can put:
body {
         background: URL(file:///C|/Project/htdocs/blue.jpg);
a {
    color: red;
    text-decoration: none;
Now you can have a plain "<body>" tag and no "style" clause in your "<a>" tag.

BTW, with explicit references to files on your PC, this code will not work when uploaded to a server.


Share this post

Link to post
Share on other sites


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.