I want to change the color
of a single piece of text inside a <pre>
. But I do NOT want to change the color
of the whole text
I am aware I can style the <pre>
like:
pre{
...
}
But that will apply it to the entire text :(
Can I somehow escape a <span>
and place it inside the <pre>
so I can do something like:
pre span{
...
}
If not, what other options do I have?
From what I read i think you are looking for something like this. http://jsfiddle.net/3guQ7/
pre span{
color: green;
}
<div>
<pre>
In not Green
<span>Im green</span>
</pre>
<div>
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