To change the color of links in HTML, use the CSS property color. Use it with the style attribute. The style attribute specifies an inline style for an element. Use the style attribute with the CSS property color to change the link color.
Change the underline color by typing a { text-decoration: none; border-bottom:1px solid red; }. Replace solid red with another color.
To highlight active HTML anchor with CSS, use the :target selector.
To change the color of an HREF link (using the anchor tag <a> ) you can use inline style attribute and apply any color you want to the color property. This should change the color of your link to red.
I have code like this
<a href="#" title="some title">
<span>Do not change color of this text</span>
Want to only change this text color
</a>
I want to change the color of anchor tag text only, not color of text in span
.
Using CSS not jQuery.
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