Removing underline with href attribute [duplicate]
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.
Solution 1:
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;
}