/ TIPS, CSS

How to remove underline from link (CSS)

This blog post will teach you how to remove underline from a link using CSS code.

By default, browsers add an underline on links.

It also adds blue and purple colors if you have previously visited the page where the link takes you to.

To remove underline from a link with CSS, add text-decoration: none to your code.

For example, to remove underline for all links on all pages, use this CSS code:

a {
  text-decoration: none;
  color: black;
}

This code targets the CSS selector “a”, which selects all HTML tags <a> - the ones used for links, and adds the CSS text-decoration: none and color: black to remove the underline and set a fixed color to the links.

Have you seen CSS Scan?

Check the CSS of any element you hover over, instantly.

Learn more →

CSS Scan logo