Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<head>
<style> 
.box {
  border: 2px solid green;
  background-color: beige;
  font-family: monospace;
  font-size: 20px;
}
.box > a {
  color: green;
}
.box > a:hover {
  color: white;
  background-color: salmon;
}
</style>
</head>
<body>
<h1>Before nesting</h1>
<div class="box">
This text contains a <a href="#">link</a>. Hover over the link to see the effect.
</div>
</body>
</html>