Hypertext links

Is it possible to turn a line of text into a hyperlink and for it not to change colour or become underlined?
I know that I could use a bitmap instead (with the border turned off) but would prefer to keep it as plain text.

Who is Participating?
jbirkConnect With a Mentor Commented:
Yes, you can!  Except that it was an added feature in the 4.0 browsers.  It's an ability enabled by CSS.
To do just one link like that, you would do it this way:
<A HREF="somewhere.html" style="text-decoration: none; color: black">Click here</A>
Of course, the color would be whatever the color of your text is.

And then if you wanted to make all the links that way you would do this:
<! --  Hide code from older browsers.
  A:link {color: black;  text-decoration: none}
  A:visited {color: black; text-decoration: none}

In version 3 browser the color can only be set when the textlink is in a table (it's crazy but true), the underlining can't be removed.

<a href="anotherpage.htm"><font color="#000000">click here</font></a>

That doesn't work *outside* a table?!?!  I never thought to check that compatibility.

I'd like to point out the usefulness of combining the two above suggestions:


<a href="anotherpage.htm"
   style="text-decoration: none; color: black"><font color="#000000">click here</font></a>


Code like this will give you the following results:

Netscape 2:  link color and underlined
Netscape 3:  black and underlined
Explorer 3:  black and no underline
Netscape 4:  black and no underline
Explorer 4:  black and no underline

So, that's pretty close.  Jbirk's comments about CSS only in version 4 browsers is mostly true:  IE3's partial implementation of JavaScript (JScript) and CSS allow for some tricks to work on more browsers, but IMHO was not worth it for the headaches they have caused.  However, this is one case where it works just dandy.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.