How to Remove Underline from a Link in Html

How to remove underline from links?

Just use text-decoration: none in your CSS or styling.
It will remove the underline from your link:

a { text-decoration: none }

How to remove underline from a link in HTML?

Inline version:

<a href="http://yoursite.com/" style="text-decoration:none">yoursite</a>

However remember that you should generally separate the content of your website (which is HTML), from the presentation (which is CSS). Therefore you should generally avoid inline styles.

See John's answer to see equivalent answer using CSS.

How to Remove Underline from HyperLink?

This should do it:

<a href="http://{website}" style="text-decoration: none;" target="_blank"><span style="font-size:9pt; font-family: Arial, sans-serif;; color:#317a00;; font-weight:bold">{website}</span></a>

more info on styling links in css can be found here: https://www.w3schools.com/css/css_link.asp

Remove underline for a div inside a Link

You may want to use text-decoration property in the class .link instead of class .innerdiv

.link {  text-decoration: none;}
.link:hover .innerdiv-with-underline { text-decoration: underline;}
<a href="" class="link"> <div>   <div class="innerdiv-with-underline">text with underline</div>   <div class="innerdiv-without-underline">text</div> </div></a>

Remove blue underline from link

You are not applying text-decoration: none; to an anchor (.boxhead a) but to a span element (.boxhead).

Try this:

.boxhead a {
color: #FFFFFF;
text-decoration: none;
}

Removing underline with href attribute

Add a style with the attribute text-decoration:none;:

There are a number of different ways of doing this.

Inline style:

<a href="xxx.html" style="text-decoration:none;">goto this link</a>

Inline stylesheet:

<html>
<head>
<style type="text/css">
a {
text-decoration:none;
}
</style>
</head>
<body>
<a href="xxx.html">goto this link</a>
</body>
</html>

External stylesheet:

<html>
<head>
<link rel="Stylesheet" href="stylesheet.css" />
</head>
<body>
<a href="xxx.html">goto this link</a>
</body>
</html>

stylesheet.css:

a {
text-decoration:none;
}

Removing underline partially from a link

The cleanest option would be to use a custom class for this link

.headerLink {text-decoration:none;}

And then another class for the parts that should be underlined:

.headerLinkAction {text-decoration: underline;}

You may want to update the hover class as well.

How to remove the underline for anchors(links)?

Use CSS. this removes underlines from a and u elements:

a, u {
text-decoration: none;
}

Sometimes you need to override other styles for elements, in which case you can use the !important modifier on your rule:

a {
text-decoration: none !important;
}

Removing underline from a part of the link

Change the :before pseudo element so that it displays as an inline-block:

  &:before {
content: '\1F847';
color: $green;
padding-right: 8px;
text-decoration: none;
display: inline-block;
}


Related Topics



Leave a reply



Submit