[Home]Remove underlines from links

HomePage | RecentChanges | Preferences | Newbie Help

Category CSS FAQ

Put this in the style section of your document:

 :link {text-decoration:none;}

This here works as well, without pseudo-classes:

 a {text-decoration:none;}

For more details, see the [text-decoration property] and also [link pseudo-classes].

And don't forget that [links want to be links] !

To use classes, for underlined and nonunderlined links on the same page (no kidding, someone actually asked for that!) --

In your style sheet:
a.type1:link {text-decoration : none}
a.type2:link {text-decoration : underline}

In the page HTML:
<a class="type1" href="cannotdecide.htm">I don't look like a link</a>
<a class="type2" href="idonotcare.htm">I look like a link</a>

For just a single instance, for individual cases on demand --

<a href="http://yourlink" style="text-decoration:none">My Link</a>

But your visitors will have no way of telling what's a link and what's not.

comments --

Remember that visitors are used to underlined links, so be sure to make the link-ness of your links very evident.

HomePage | RecentChanges | Preferences | Newbie Help
This page is read-only | View other revisions
Last edited September 27, 2001 4:37 pm (diff)

This FAQ is happily hosted by Betadome Digital Media