They are used to add special effects to some selectors.

For example, we can establish links <a> different CSS styles:

/* unvisited link */ a:link {color:blue} /* visited link */ a:visited {color:grey} /* mouse over link */ a:hover {color:green} /* selected link */ a:active {color:red}

It may also be useful to highlight the field in the form that we filled.

For example, put yellow background form field where we are.

<style type="text/css"> input:focus { background-color:yellow; } </style> <form action="form1.php" method="post"> Input 1 <input type="text" name="input1" /> Input 2 <input type="text" name="input2" /> <input type="submit" value="Submit" /> </form>