Removing underline with href attribute

HtmlHrefUnderline

Html Problem Overview


> 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.

Html Solutions


Solution 1 - Html

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;
   }

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionVictor MukherjeeView Question on Stackoverflow
Solution 1 - HtmlCurtisView Answer on Stackoverflow