When developing a website, you might use anchor elements to create links in a website that might lead to a webpage internally or externally.
By default, links have an underline below them.
This is what a link looks like by default.
To remove an underline from a link in HTML, we can use the CSS text-decoration property.
Along with a lot of options that we have in the text-decoration property, we can use the "none" value to remove the underline from a link.
We can use this CSS property inline or in an external CSS. Let's see both of these in the example below:
Removing Underline From Link From HTML Using Inline CSS
Removing Underline From Link From HTML Using External CSS
.no-underline {
text-decoration: none;
}
Result
The result from both the above examples has the same result. We get a link with no underline.