Removing the underline from under a visited link [duplicate] - html

This question already has answers here:
Underlining visited links
(2 answers)
How can I remove the underline of a link in chrome using CSS? [duplicate]
(3 answers)
Closed 8 years ago.
What is the CSS code that I need to write in order to remove the underline from these link after visiting them?
<ul id = "header">
<li> Home </li>
<li>Images</li>
<li>Videos</li>
</ul>
I tried this:
a:visited { text-decoration: none; }
but it didn't work.
Here is a fiddle showing the problem: http://jsfiddle.net/litari/X2Yjk/1/

You can't change text-decoration in :visited
Rather set text-decoration:none on anchors and text-decoration:underline on links you want underlined. For example you can use a class to achieve this.
a
{
text-decoration:none;
}
a.underlined
{
text-decoration:underline;
}

I think you should define the default state as well, so for example:
a:link { text-decoration: underline; }
a:visited { text-decoration: none; }

If existing code is not working for you then please add "!important" in your property.
a:visited
{
text-decoration: none !important;
}

Or try
outline: 0;
It might work on FF.

As mentioned before, changing text-decoration for :visited anchors does not work.
But you could do the following:
a {
border-bottom:1px solid #000;
text-decoration:none;
}
a:visited {
border-bottom-color:rgba(255,255,255,0);
}
This works fine for me: http://jsfiddle.net/Whre/N8c3A/
To test it using chrome inspect the anchor with the developer tools, rightclick the markup and say "Force element state" -> ":visited".

Related

Html and css remove hyperlink [duplicate]

This question already has answers here:
Remove blue underline from link
(22 answers)
Closed 1 year ago.
How can i get rid of the underline and the different color because i do not want it to show the hyper link
[1]: https://i.stack.imgur.com/SfcDC.png
You can use the following code.
Put this code in CSS file
a {
text-decoration: none;
color: red;
}
a:hover{
color: black; /* You can use etc. color when user hover on link its change color of text */
}
Click here
You can use the following code to remove the underline from the hyper link.
Use this code in .css file
a:link {
text-decoration: none;
}
or you can use inline css:
Click here

Remove underline from HTML [duplicate]

This question already has answers here:
How to remove underline from a link in HTML?
(8 answers)
Closed 4 years ago.
I am looking for how to remove the underline from this bit of HTML
I tried this but have no idea where to place it in this line. (I am not a developer)
<span style="color:#15BECE;">Unsubscribe</span> from email communications<br>
Thanks, everyone!!
This is the bit that fixed my problem. I know this was very novice and appreciate your help!
<a style="text-decoration:none"><span style="color:#15BECE">Unsubscribe</span></a> from email communications</p>
You can use CSS to do this.
In the <head> tag of your .htm(or .html) file, add the following code:
<style>
a {
text-decoration: none;
}
<style>
For adding further styles, you can use styling on the tag:
<style>
a:link {
/*a normal <a> tag*/
text-decoration: none;
color: value;
}
a:hover {
text-decoration: underline;
color: /*Your desired color when cursor is on the link*/;
}
a:visited {
text-decoration: none;
color: /*Your desired color when link is clicked and visited*/;
}
a:active {
text-decoration: underline;
color: /*Your desired color when link is clicked*/;
}
<style>

H1 link boarder in chrome [duplicate]

This question already has answers here:
How can I remove the outline around hyperlinks images?
(18 answers)
Closed 5 years ago.
I have a problem. On https://analytium.co.uk/our-cases/ when i click on header see border. It problem only in chrome. Does anyone have any idea why this border appears when clicking?
.myLinkHeading {
outline : none;
}
Just remove the anchor outline.
You have default css coming from bootstrap
a:focus {
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
you should replace by
.works-name a{
outline:none;
}
You can add on you inline css:
<a href="https://analytium.co.uk/cases/sas-and-fraud-prevention-brief-overview/" style="color: #444;outline:none" tabindex="0">
SASĀ® and Fraud Prevention (Brief Overview)
or add on your css file :
a, a:focus {
outline:none;
}

Disable the "a" attribute underline? [duplicate]

This question already has answers here:
How to remove underline from a link in HTML?
(8 answers)
Closed 6 years ago.
I was wondering how you would disable to underline on the "a" attribute, for href's. I find it annoying, and I was wondering if there was a bit of code I could add to my .css to change it. Thank you.
A simple google search provides this very easy....
a {
text-decoration: none;
}
simply set a {text-decoration:none}
see in action:
a {
text-decoration: none
}
No Underline
EDIT (I am editing this to whoever downvote it, because that could be the only reason for)
In case you have multiple a's and some of them don't have the attribute href then you can target the href like this:
/*demo */
div {
border: dotted lightblue;
margin: 10px;
font-size:30px
}
a {
display: block;
}
/*in action*/
div:last-of-type a[href] {
text-decoration: none
}
<div>
<a>Without href doesn't make it a link</a>
Link with Underline
</div>
<div>
<a>Without href doesn't make it a link</a>
Link Without Underline
</div>

Not Underlined link in HTML

How to get a link not underlined in HTML?
It can be done in following ways:
1) If you want to remove underline from specific link, then use
Some text
2) To remove the underline from entire html page, Create a .css file, In that write following:
a { text-decoration: none; }
It will suppress underline from every anchor tag.
Just guessing at what your next question would be....
a {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
As everyone above said, but I wouldn't use inline styles.
Rather set a class for all links that you do not wish to have underlined.
Your link
CSS:
a.nolines{text-decoration:none;}
You'll probably want to do that in CSS.
a {
text-decoration: none;
}
Or, as an inline style:
link
for one link, use style="text-decoration:none"
if you want it for the whole site:
<style> a { text-decoration:none; } </style>
Using CSS. The property you need to set is text-decoration: none;