Removing the Links Default Underlines using CSS

CSSWeb DevelopmentFront End Technology

To remove the links default underlines using CSS, the code is as follows −

Example

 Live Demo

<!DOCTYPE html>
<html>
<head>
<style>
a:link {
   color: blue;
   text-decoration: none;
}
a:visited {
   color: blue;
   text-decoration: none;
}
</style>
</head>
<body>
<h1>Demo Heading</h1>
<div>
<p>This is the <a href="https://tutorialspoint.com">reference</a></p>
</div>
</body>
</html>

Output

Example

Let us now see another example −

 Live Demo

<!DOCTYPE html>
<html>
<head>
<style>
a:link {
   color: blue;
   text-decoration: none;
}
a:hover {
   color: blue;
   text-decoration: none;
}
a:active {
   color: blue;
   text-decoration: none;
}
</style>
</head>
<body>
<h1>Demo Heading</h1>
<div>
<p>This is the <a href="https://tutorialspoint.com">reference</a></p>
</div>
</body>
</html>

Output

raja
Published on 30-Dec-2019 16:42:08
Advertisements