I want to set color of some elements to default link color with CSS.
<a href="/">That color</a> is the same as <span style="color: link;">that</span>.
Any way to do that? This website don't change default browser's link color.
Link color using Hex color codes To start with we'll use a Hex color code, probably the most common method of adding color to links. In your HTML anchor tag (<a>), after the href attribute, insert a style attribute with the color property set to your Hex color code (in our case #FF0000).
Even if you don't change the default color, it would still be a good idea to specify the color to ensure that it looks the same in all browsers. I'd put something like this in the stylesheet:
a, span.link {
color: blue;
}
a:visited, span.visited {
color: purple;
}
a:active, span.active {
color: red;
}
Then you can style span
s as links by <span class="link">Your fake link</span>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With