Remove underline from link CSS/HTML | Example code

Use CSS to remove the underline from the link in HTML. In CSS set the property “text-decoration” to “none”.

Examples of Remove underline from link CSS

Here is simple examples of it:-

Inline CSS Example

Just add text-decoration:none; to a tag for #none: Use it with the style attribute

Output:

Remove underline from link CSS

Internal CSS Example

Try this, add a id(or class) to your a href

Below code belongs in the <head> of your document or in a stylesheet:

Complete Example

Output:

How to Remove underline from link HTML

Q: How to remove underline from a link in HTML?

Code for remove all underlines from all links:

If you Want to Remove the underline of specific links then apply this to, give them a class name, like nounderline and do this:

It will apply only to same class name links and leave all others unaffected.

Do comment if you have any doubts and suggestions on this topic.

Note: The All HTML Examples codes are tested on the Firefox browser and the Chrome browser.

OS: Windows 10

Code: HTML 5 Version


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.