• Post category:CSS

CSS :link() Pseudo Class Selector | Advanced Guide

CSS Link Selector

In this article, we will see the syntax of CSS link selector and how to use it.

The syntax for link selector

declaration list;

It selects any HTML element targeted by the selector if its status is un-visited (or default).

It selects any anchor element, if its status is un-visited then apply none text-decoration

a: link

Example Code:

text-decoration: none;


<a href="#">Click Here</a>




  1. In the above code, we have created <a> tag in the HTML body section.
  2. By default, the anchor text color is set to blue, and text-decoration is set to be underlined.
  3. I want the to text-decoration be set to none for the anchor tag. So, in CSS We select “a:link” and in the parentheses, we use the “text-decoration” property and give the value as “none
  4. See the above output, the default decoration is changed to none.
READ ALSO  Background-origin in CSS | Explained with Example

Leave a Reply