CSS Links

This page contains the common CSS properties related to links and they include:

color: this property sets the color of the text in the link. For example, "color: blue;" will make the link text blue.

text-decoration: this property sets the decoration of the link, such as underline or none. For example, "text-decoration: none;" will remove the underline from the link.

hover: this pseudo-class is used to apply styles to a link when the mouse hovers over it. For example, "a:hover {color: red;}" will change the color of the link text to red when the mouse hovers over it.

visited: this pseudo-class is used to apply styles to a link that has already been visited. For example, "a:visited {color: purple;}" will change the color of the link text to purple for links that have been visited.

active: this pseudo-class is used to apply styles to a link that is currently being clicked or activated. For example, "a:active {color: green;}" will change the color of the link text to green when it is being clicked.

cursor: this property sets the cursor type when the mouse pointer is over the link. For example, "cursor: pointer;" will change the cursor to a pointer hand when the mouse is over the link.

For the learning purpose of this documentation these are just a few of the CSS properties related to links. There are many others, such as font-family, font-size, and background-color, which can be used to further customize the appearance of links on a web page.

Last updated