0

I created a text area and tried to use span within it but the span tag is taken as a value. Please help me out, my code was as follow -:

<textarea id="example"><span>This text's background need to be changed.</span>Not for this</textarea>

I used CSS for this.. but it didn't work out.

textarea{
background: red;
}
span{
background: yellow;
}

Any help will be appreciated.

  • I wanted to change the background color of a specific piece of text within text area.. Is it possible ? –  Jun 11 '20 at 04:30
  • Whatever you write in between of `textarea` is considered as plain text(not html), so it is not possible to target `span` in `textarea` – Sameer Jun 11 '20 at 04:33
  • yess.. thats what i want to know that is it even possible to do that –  Jun 11 '20 at 04:35

0 Answers0