71

Possible Duplicate:
How to remove the underline for anchors(links)?

In the following code below, the link gets underlined when I use the href attribute.

<html>
<body>
<a href="xxx.html">goto this link</a>
</body>
</html>

I want the link to be associated with that tag, but not to be underlined. How can I do that? Thanks in advance for your help.

Community
  • 1
  • 1
Victor Mukherjee
  • 10,487
  • 16
  • 54
  • 97
  • 1
    did you searched in google before posting this question.....if you did any research before posting u will get correct result in first link.... –  Sep 21 '12 at 10:06

1 Answers1

142

Add a style with the attribute text-decoration:none;:

There are a number of different ways of doing this.

Inline style:

<a href="xxx.html" style="text-decoration:none;">goto this link</a>

Inline stylesheet:

<html>
<head>
<style type="text/css">
   a {
      text-decoration:none;
   }
</style>
</head>
<body>
<a href="xxx.html">goto this link</a>
</body>
</html>

External stylesheet:

<html>
<head>
<link rel="Stylesheet" href="stylesheet.css" />
</head>
<body>
<a href="xxx.html">goto this link</a>
</body>
</html>

stylesheet.css:

a {
      text-decoration:none;
   }
Curtis
  • 101,612
  • 66
  • 270
  • 352