<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.lnk_cls:link {
color: #000000;
}
/* selected link */
.lnk_cls:active {
color: red;
}
/* mouse over link */
.lnk_cls:hover {
color: green;
}
/* visited link */
.lnk_cls:visited {
color: blue;
}
</style>
</head>
<body>
<a class="lnk_cls" href="#">Test Link</a>
</body>
</html>
Used of:-
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.lnk_cls:link {
color: #000000;
}
/* selected link */
.lnk_cls:active {
color: red;
}
/* mouse over link */
.lnk_cls:hover {
color: green;
}
/* visited link */
.lnk_cls:visited {
color: blue;
}
</style>
</head>
<body>
<a class="lnk_cls" href="#">Test Link</a>
</body>
</html>
Used of:-
CSS Links
We can style the links with any CSS property (e.g. color, font-family, background, etc..).
The four links states are(<a> tag selectors):
- a:link - a normal, unvisited link
- a:visited - a link the user has visited
- a:hover - a link when the user moves the mouse over it
- a:active - a link with the mouse clicked
The four links states are(<a> tag selectors):
- a:link - a normal, unvisited link
- a:visited - a link the user has visited
- a:hover - a link when the user moves the mouse over it
- a:active - a link with the mouse clicked
Css:- Link
Reviewed by Network security
on
May 06, 2019
Rating:
No comments: