CSS Links

Links are defined by Anchor Element. And these links are made stylish by CSS Link Properties.

By the way, CSS has not defined any different properties for links. Font and Text Properties are used only to make Links a Style.

Styling Links

HTML links are different from ordinary text. Its behavior varies according to the circumstances. There are four stages according to the condition of link.

  1. Link – This is the first condition of the link. Links in this condition are open for the first time in the browser. Meaning this has not been clicked once. It is style by a: link selector
  2. Visited Link – When a link has been clicked, that link is called Visit Link. It is style by a: visited selector
  3. Hover Link – When the Mouse Pointer is taken to a link, then the action is called Hover at that time. And the changes that occur in the link during the hover. It’s called Hover Effect. It is style by a: hover selector.
  4. Active Link – The link you are currently on is called Active Link. It is style by a: active selector.


/* unvisited link */
a:link {
  color: red;

/* visited link */
a:visited {
  color: green;

/* mouse over link */
a:hover {
  color: hotpink;

/* selected link */
a:active {
  color: blue;