How to remove the underline from a name on hover with CSS?

Spread the love

Sometimes, we want to remove the underline from a name on hover with CSS.

In this article, we’ll look at how to remove the underline from a name on hover with CSS.

How to remove the underline from a name on hover with CSS?

To remove the underline from a name on hover with CSS, we set the text-decoration property.

For instance, we write

legend.green-color a:hover {
  text-decoration: none;
}

to select the element when it’s hovered with :hover.

And we add text-decoration: none; to remove the underline when it’s hovered.

Conclusion

To remove the underline from a name on hover with CSS, we set the text-decoration property.

Leave a Reply

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