-1

What is the most efficient way to change the color of just one letter in a word (css/html) ?

neptune
  • 33
  • 7
  • 1
    [Duplicate](https://google.com/search?q=site%3Astackoverflow.com+js+change+color+of+letter+of+text+node) of [How can I color specific letters in html element text?](https://stackoverflow.com/q/26485729/4642212). AFAIK, changing an arbitrary letter’s color (other than the first) isn’t possible in CSS, so use [JavaScript](https://developer.mozilla.org/en-US/docs/Web/API/Text/splitText). – Sebastian Simon Mar 28 '21 at 00:35
  • Does this answer your question? [Change color of one word in

    tag](https://stackoverflow.com/questions/45333386/change-color-of-one-word-in-p-tag)

    – Zam Abdul Vahid Mar 28 '21 at 00:37

1 Answers1

2
<p>This is my tex<span style = "color:red">t</span></p>

Is a easy way to do this.

Result:

This is my text

BossCode
  • 71
  • 9