So, You Don't Want Links Underlined, Huh?

By Joe Burns

Take a look at the links below:

HTML Goodies   ESPN
Van Halen News Desk ABC News Pepsi

     Notice anything about them? They are not underlined, yet they are still active. (If they are underlined on your browser, then you do not have a browser level high enough to use this command; you still can use it, though, because others will have the correct browser!)

     For a good while, people would write to me and ask how to rid the links on their page of the awful underline. I would always write back that you could always get rid of it: Just go into your browser's Preferences and set it so the links are not underlined. Done.
     But I knew what they wanted -- they wanted the links non-underlined on all browsers, not just theirs. Well, here's how you do it:


     You place that Style Command statement inside the HEAD commands on your HTML document. In that position, it affects all the links and makes them plain. They retain their coloring, but lose their underline.

Affecting Just One Link

     I have been given two ways of making only one link non-underlined. Here they are in their own words.

This suggestion by Luke Erichsen:

There IS a way to make just one link not underlined. Simply do this:

<A HREF="page.html" STYLE="text-decoration: none">Huh</a>

This suggestion by >Nikhil Gupta:

Place this style command in place of the one you have above:


     (From Joe:The numbers 1 and 2 are classes. Referring a link to class 1 does the "none" text decoration, class 2 does the other.)

And then later in the program place this:

<a class="1" href="http://some.server.com/some page/">
This link is not underlined...</a>

This is for the link which should not be underlined:

<a class="2" href="http://some.server.com/some page/"> This link IS underlined...</a>

To underline it replace class="1" with class="2" like above.


  • Web Development Newsletter Signup

    Invalid email
    You have successfuly registered to our newsletter.
Thanks for your registration, follow us on our social networks to keep up-to-date