HTML Element Style How to - Remove underline from anchor








Question

We would like to know how to remove underline from anchor.

Answer


<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
.theLink {<!--from   w w w.j a  v  a2 s. com-->
  text-decoration: none;
}
</style>
</head>
<body>
  <a href="" class="theLink"><div class="i6">Test Page</div></a>
</body>
</html>

The code above is rendered as follows: