How to change an HTML5 input's placeholder color with CSS?
Answers
Answered by
0
to change color of placeholder text you have apply css, for that user pseudo element ::placeholder element
this all behaves different in different browser
<input type="text" placeholder="write name here" name="name"/>
::-webkit-input-placeholder { /* Chrome/Opera/Safari */
color: red;
}
::-moz-placeholder { /* Firefox 19+ */
color: red;
}
:-ms-input-placeholder { /* IE 10+ */
color: red;
}
:-moz-placeholder { /* Firefox 18- */
color: red;
}
Similar questions
English,
7 months ago
CBSE BOARD XII,
7 months ago
Biology,
1 year ago
Social Sciences,
1 year ago
Physics,
1 year ago
Art,
1 year ago