answersLogoWhite

0


Best Answer

To change link colors in HTML, you need to make a reference to them in your style sheet (or your internal styles). The references you need to use are:

a:link
a:visited
a:hover
a:active

Simply add these to your style sheet like so:

a:link {
color: #CCCCCC;
}
a:visited {
color: #CCCCCC;
text-decoration: none;
}
a:hover {
color: #999999;
}

Also, adding "text-decoration: none;" will remove the default underline from links.

If you are trying to style multiple links within one page, that is also easy. You simply need to create a new link class, and apply that class to your links that you wish to display differently. Here are the styles:

a.footer:link {
color: #FFFFFF;
}
a.footer:visited {
color: #FFFFFF;
}
a:hover {
color: #999999;
}

And the link should look like this:
Test

User Avatar

Wiki User

14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

16y ago

you have to use javascript; check the linked page.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you make HTML text change color depending on the background?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the background code for a HTML document?

A background can be added on CSS. ex: #body {background: url(../images/bodybg.jpg) repeat-x;}The HTML code for background color is Note: The code must be put inside the body tag, that is between and of your HTML script and the values of color can be change accordingly. For example, if you want to put gray background color you simply change the value to "#727272" or "#000000" for black if you want.


What is bgcolor?

bg color is the abbreviation of background color there is a command used in HTML which set the background color which u want


What is the code of backround in HTML?

Background can be easily added into the HTML code. in the <style> element you can add background-color="red".


Which HTML tag would be apply the bgcolour attribute to change the background color of single table row?

The tr tag.


What is the preferred way for adding a background color for HTML?

The preferred method for adding background color to an element is not through HTML, but rather through CSS (i.e. the background-color statement). Older versions of HTML support the now-deprecated (and soon obsolete) bgcolor element attribute.


How do you add a background color for all h1 elements?

h1 { color: #f00; } Yields red H1 headers in shorthand for #ff0000 that is used in HTML. This will work in all cases unless an ID or a class overrides it.


How can the background color for a website be changed using html code?

To change the color, one simply adds a new color code between the and tags. Lists of color codes can be found online at sites like quackit.


What is a HTML code for a background on tinierme?

If for an image: <body background="images/background.jpg"> or if for a color: <body bgcolor="#000000">


How do you change your howrse page background color?

you can't change the whole color but you cn add layouts and banners and stuff. Using HTML you can put this code fragment within the head section: <style> body{ background:lightblue } </style>


HTML for adding a background color?

It's not HTML. Background color is a CSS style. You need to put in either a stylesheet, or attach the style attribute to the tag whose background color you're trying to set. For instance: <p style="background-color:blue;">This paragraph would have a blue background.</p> Colors in CSS can be set using names (there's 170 or so of them) Via a hexadecimal RGB value: <p style="background-color:#b3b3b3;">This a meduim gray. The pairs of hex digits correspond to RGB.</p> Using RGB directly: <p style="background-color: rgb(179,179,179);">This is the same color as #b3b3b3</p> And using RGBA (which gives you an alpha channel, letting you set transparency) <p style="background-color: rgba( 179, 179, 179, .5 );">This paragraphs background color would be 50% transparent.</p>


How do i change my Tumblr background everytime i click on customize appearance and themes the custom HTML isn't there?

After you click on the "Customize Appearance" link, the bar on the left should show either your selected theme or "custom theme." You should see an "Edit HTML" button next to it. Clicking on that will bring you to the HTML of your theme. You can change your background on the HTML. Or instead of going to the custom HTML, you can go under Appearance and you can either upload a picture for your background or change the colour of it.


Which property lets you change the color of various elements on the webpage?

In CSS: there will be a part underneath the section you are wanting to change called: "font-color" which will allow you to change the colour of the webpage text, same for "background-color". In HTML it is slightly easier to understand: this is the code i use when scripting <font face="pick a font" color="pick a colour" size="pick a size"> for background colour... <body bgcolor="pick a colour">