I have a problem with placeholders. I want to ask if it is possible to style the value in the input fields, but in the way to style the words with this value are different.
For example, if we have an input field that has an initial value of "First Name"
I want to have green color
for "First"
and red color
for "Name"
(this is just an example).
Is it even possible?
Note: I use the value as a "placeholder" (instead of the html placeholder attribute) due to ie.
<input type="text" value="First Name" onFocus="if (this.value == 'First Name') {this.value = '';}" onBlur="if (this.value == '') {this.value = 'First Name';}" />
source share