How do I create a link on a word without changing the color or style of the text? Usually applying <a> to the word applies the blue color and the underlining. Is there a way to prevent <a> from applying any visual changes to the word besides the cursor changing to a hand pointing.
Eg. Imagine my link style is:
a { color: orange } which makes a link look this
Now imagine I have a huge colored heading like this: My cool heading
I want to make this a link but I don’t want it to be orange or underlined. How?
I can manage the underlined part, but what about color.
Eg. Is there something like:
.fooclass a { color: #leave it as it is#; text-decoration: none }
I think you missed my question. I’ll try to give a more clear example.
Here is a black bold heading:
<h1>Test</h1>
When you wrap a link around it, it turns blue and becomes underlined, right?
<h1><a href=“foo.html”>Test</a></h1>
Now how do I prevent <a> from changing the color of the black <h1> heading?
WAIT! You’re going to say, that’s easy! All you need to do is:
h1 a { color: black; text-decoration: none } and it will look the same right?
This is not what I want though. I want you to assume you don’t know what color the text in the <h1> fields are. In my real scenario, the text is multiple colors so applying a single color to <a> will not help.
Is there a solution? I simple want to tell <a> not to apply a new color, delete it’s color value, etc.