Introducción a CSS

16.8. Solución ejercicio 8

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Ejercicio de pseudo clases de enlaces</title>
<style type="text/css">
a {
  margin: 1em 0;
  color: #CC0000;
  float: left;
  clear: left;
  padding: 2px;
}
a:hover {
  text-decoration: none;
  background-color: #CC0000;
  color: #FFF;
}
a:visited {
  color: #CCC;
}
</style>
</head>

<body>
<a href="#">Enlace número 1</a>

<a href="#">Enlace número 2</a>

<a href="#">Enlace número 3</a>

<a href="#">Enlace número 4</a>

<a href="#">Enlace número 5</a>
</body>
</html>

Descargar solución completa