Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change color of only text of anchor link?

Tags:

People also ask

How do I change the color of text in anchor tag?

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.

How do I change the underline color of an anchor tag?

Change the underline color by typing a { text-decoration: none; border-bottom:1px solid red; }. Replace solid red with another color.

How do you highlight an anchor tag in HTML?

To highlight active HTML anchor with CSS, use the :target selector.

How do I change the color of a link in Javascript?

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.