ScanSkill
CSS Examples

How to Remove Underline from Anchor Tags or Links using CSS

In this example, we will learn how to remove underline from anchor tags or links using CSS. The underline is set by default in the anchor tags where href is specified. We can remove this default underline using text-decoration: none.

Prerequisites

Example

HTML

<a href="#">This is default</a>
<a href="#" class="remove">Underline removed</a>

CSS

	.remove {
            text-decoration: none;
        }

Output

How to Remove Underline from Anchor Tags or Links using CSS

Here, we remove the underline from the link that was set by default in the <a> tag. We can also change the color of the text using the color property.

Conclusion

In this example, we learned how to remove underline from anchor tags or links using CSS. We used the text-decoration: none value to remove the underline.