How to change placeholder color - CSS?

Normally, the placeholder text is grey. You can easily change the color of the placeholder using the below code.

<!DOCTYPE html>
<html>
    <head>
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <style>
             /* Firefox */
            ::placeholder {
                color: blue;
            }
            /* Internet Explorer 10-11 */
            :-ms-input-placeholder { 
            color: blue;
            }
            /* Microsoft Edge */
            ::-ms-input-placeholder { 
            color: blue;
            }
        </style>
    </head>
    <body>
        <div>Change The Placeholder Color</div>
        <input type="text" placeholder="Placeholder...">
    </body>
</html>

Thank You.

How to change placeholder color - CSS?
About author
0 comments
Be a First Comment
Add Your Comment