How to change an HTML5 input’s placeholder color with CSS?

Sometimes, we want to change an HTML5 input’s placeholder color with CSS.

In this article, we’ll look at how to change an HTML5 input’s placeholder color with CSS.

How to change an HTML5 input’s placeholder color with CSS?

To change an HTML5 input’s placeholder color with CSS, we use the ::placeholder selector.

For instance, we write

::placeholder {
  color: #909;
}

to set the input placeholder’s color to #909.

if(typeof ez_ad_units != ‘undefined’){ez_ad_units.push([[250,250],’thewebdev_info-medrectangle-3′,’ezslot_2′,320,’0′,’0′])};__ez_fad_position(‘div-gpt-ad-thewebdev_info-medrectangle-3-0’);

Conclusion

To change an HTML5 input’s placeholder color with CSS, we use the ::placeholder selector.