Link to home
Start Free TrialLog in
Avatar of Caralinus
Caralinus

asked on

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.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of jbirk
jbirk

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sybe
sybe

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.

<table>
<tr>
<td>
<a href="anotherpage.htm"><font color="#000000">click here</font></a>
</td>
</tr>
</table>
sybe-

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:


<table><tr><td>

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

</td></tr></table>


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.