Hello Devs,
In this tutorial, we will learn CSS Links
You can change the style of a link using CSS.
text-decoration property
The text-decoration property is used to remove or add underline from the link.
text-decoration property:
Example:
<!DOCTYPE html>
<html>
<head>
<style>
.nounderline {
text-decoration: none;
}
.underline {
text-decoration: underline;
}
</style>
</head>
<body>
<a href="https://www.rathorji.in/" class="underline">Underline link</a>
<br>
<br>
<a href="https://www.rathorji.in/" class="nounderline">None Underline link</a>
</body>
</html>
Background Color
The background-color property used to add a background-color for links.
<!DOCTYPE html>
<html>
<head>
<style>
a:link {
background-color: yellow;
}
a:visited {
background-color: cyan;
}
a:hover {
background-color: lightgreen;
}
a:active {
background-color: green;
}
</style>
</head>
<body>
<h3><b><a href="https://www.rathorji.in/" target="_blank">Student Tutorial</a></b></h3>
</body>
</html>
May this example help you.