TechieDrill Your World Of Technical Tutorials

How to get rid of the underline links using CSS?

11.10.2009 · Posted in CSS

You can easily get rid of the underline in the links you are providing in your scripts using CSS. You have to add the CSS code to your script in the Head section

<style type=”text/css”>
<!–
A:link {text-decoration: none}
A:visited {text-decoration: none}
–>
</style>

By adding the CSS code you can avoid the underline in your links.

Say for Eg:

<html>
<head>
<title>Link without underline using CSS</title>
<style type=”text/css”>
<!–
A:link {text-decoration: none}
A:visited {text-decoration: none}
–>
</style>
</head>
<body>
<center>
<a href=”Url here”><b>Link without underline</b></a></center>
</body>
</html>

displays you the link “Link without underline”  without the underline as shown below




Link without underline


Leave a Reply

You must be logged in to post a comment.