Recommand · June 11, 2021 0

how to change color of the placeholder of date input html tag?

I already know how to change the placeholder value’s color, but the same is not possible with the date input tag, please tell me how to do so,

<input type="date" />

This has to be done with JavaScript.

<input type="date" style="color:red" />

<!DOCTYPE html>
<title>Change Placeholder Color</title>
::placeholder { /* Firefox, Chrome, Opera */
    color: blue;
:-ms-input-placeholder { /* Internet Explorer 10-11 */
    color: red;
::-ms-input-placeholder { /* Microsoft Edge */
    color: orange;
    <p>Change Placeholder Color</p>
    <input type="text" placeholder="Enter your Text">

You can check here: