Jump to content

Changing the colours of my links.


OriginalSunny

Recommended Posts

Hi,
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???

<html>

<head>
<title></title>
</head>

<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>
.
.
.
.
.

</body>

</html>
Link to comment
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:
[code]
<style>
body {
         background: URL(file:///C|/Project/htdocs/blue.jpg);
         }
a {
    color: red;
    text-decoration: none;
    }
</style>
[/code]
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.

Ken
Link to comment
Share on other sites

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.