How do I remove the default link color of the html hyperlink 'a' tag?
The inherit value:
a { color: inherit; }
… will cause the element to take on the colour of its parent (which is what I think you are looking for).
A live demo follows:
a {
color: inherit;
}
<p>The default color of the html element is black. The default colour of the body and of a paragraph is inherited. This
<a href="http://example.com">link</a> would normally take on the default link or visited color, but has been styled to inherit the color from the paragraph.</p>
Is there a way to unset an 'a' tag link to the default color
The value for original setting you're looking for is called initial
.
a:hover {
color: initial
}
However, that might make the link black. Which means it wouldn't work for you in this case. You can get around this another way though, through your a
style. Use the inverse of :hover
using the :not
selector.
a:not(:hover){
color: #000;
text-decoration: none;
}
<a href="#">Hi, I'm Link.</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;
}
Remove ALL styling/formatting from hyperlinks
You can simply define a style for links, which would override a:hover
, a:visited
etc.:
a {
color: blue;
text-decoration: none; /* no underline */
}
You can also use the inherit
value if you want to use attributes from parent styles instead:
body {
color: blue;
}
a {
color: inherit; /* blue colors for links too */
text-decoration: inherit; /* no underline */
}
Blue and Purple Default links, how to remove?
You need to override the color:
a { color:red } /* Globally */
/* Each state */
a:visited { text-decoration: none; color:red; }
a:hover { text-decoration: none; color:blue; }
a:focus { text-decoration: none; color:yellow; }
a:hover, a:active { text-decoration: none; color:black }
Related Topics
How to Float a Div Over Google Maps
Tools for Obfuscating HTML and CSS
How Move 'Nav' Element Under 'Navbar-Brand' in My Navbar
Selecting All Links Except Hovered One CSS Only
CSS Stretch Textbox to Fill Remaining Space
Why Is Box-Sizing Acting Different on Table Vs Div
Make an Image Width 100% of Parent Div, But Not Bigger Than Its Own Width
Github Pages and Relative Paths
Can HTML5 Communicate with Peripherals Like Scanners and Credit Card Readers
Div with Horizontal Scrolling Only
How to Send HTML Email Using R
Draw Triangle in Corner of Div
What Is The Max Number of Files to Select in an HTML5 [Multiple] File Input
How to Detect "​" (Combination of Unicode) in C++ String
How to Customize a Select Element Through CSS to Achieve This Dark Style
Combining Two or More Canvas Elements with Some Sort of Blending