Remove underline from CSS link

By default, all CSS links are decorated with an underline. But, there may be a situation, when we want to remove these underlines from the links. For example, creating a navbar, side menu, etc.

To remove the underline from CSS links, we can use the text-decoration property. Simply set the text-decoration property to none and this will completely remove any existing under or overline from the link. Try out the example below to check how it works:

Example:

a{
   text-decoration: none;
}

We can also use the text-decoration property to remove underlines from the links when we hover over them. Refer to the example below:

Example:

a:hover{
  text-decoration: none;
}

Author

  • Manoj Kumar

    Hi, My name is Manoj Kumar. I am a full-stack developer with a passion for creating robust and efficient web applications. I have hands-on experience with a diverse set of technologies, including but not limited to HTML, CSS, JavaScript, TypeScript, Angular, Node.js, Express, React, and MongoDB.