CSS Link

In CSS, you can style hyperlinks (links) using pseudo-classes that represent different states of the links. The most commonly used pseudo-classes for links are:


:link: Targets an unvisited link.

:visited: Targets a link that has already been visited.

:hover: Targets a link when the user hovers over it with the mouse.

:active: Targets a link at the moment it is being clicked.

Example
/* Unvisited link */
a:link {
color: blue;
text-decoration: none;
}

/* Visited link */
a:visited {
color: purple;
}

/* When the user hovers over the link */
a:hover {
color: red;
text-decoration: underline;
}

/* When the link is being clicked */
a:active {
color: orange;
}

Try it yourself


Whereisstuff is simple learing platform for beginer to advance level to improve there skills in technologies.we will provide all material free of cost.you can write a code in runkit workspace and we provide some extrac features also, you agree to have read and accepted our terms of use, cookie and privacy policy.
© Copyright 2024 www.whereisstuff.com. All rights reserved. Developed by whereisstuff Tech.