Skip to content Skip to sidebar Skip to footer

Creating Hyperlinks Without Being Underlined

I have a simple question about creating hyperlinks.. clickme creates a hyperlink but click me would be underlined... How do I create a hyperlink where links wou

Solution 1:

use css. something like this:

a
{
text-decoration: none;
}

to restore underline on hover:

a:hover
{
text-decoration:underline;
}

you may replace a with a class selector or an Id.

EDIT: typos;

Solution 2:

Yes, you should use css.

<a href="link" style="text-decoration: none;">asdf</a>

Solution 3:

Use css for hiding underline from anchor tag:

'a:link { text-decoration: none}'

http://jsfiddle.net/sushant_ceb/L9KNT/

Solution 4:

To disable underline for all hyperlinks in the document, use

<STYLETYPE="text/css"><!-- 
  A:link {text-decoration: none}
--></STYLE>

in the head of your HTML-File.

To only disable underlining for certain hyperlinks, use

<STYLETYPE="text/css"><!-- 
  A:link.nounderline {text-decoration: none}
--></STYLE>

and define hyperlinks not to be underlined as usual (<a href="://www.google.com">Google</a>), but use your nounderline class for those that shall not be underlined:

<aclass="nounderline"href="http://www.yahoo.com">Yahoo</a>

Solution 5:

To read more about what you can do with text decoration (besides merely underlining or not), read the CSS3 Text Specs.

Post a Comment for "Creating Hyperlinks Without Being Underlined"