How to Remove Underlines from Hyperlinks

Maybe you don't like the plain-old style of hyperlinks, you can remove the underlines from those links by CSS. For example,

<div class='google_link_div'>
  <a href='//www.google.com/'>Go to Google</a>
</div>

To remove the underlines from links, you must set "text-decoration" to none in <a> to suppress the default style.

<div class='google_link_div'>
  <a href='//www.google.com/' style='text-decoration: none;' >Go to Google</a>
</div>

The output will be:

If you want to style the link externally, you can do it like this:

.google_link_div a {
  ...
  text-decoration: none;
}

Or for all hyperlinks:

a {
  ...
  text-decoration: none;
}

Leave a Reply

Your email address will not be published. Required fields are marked *