{"id":9339,"date":"2021-01-05T08:34:43","date_gmt":"2021-01-05T13:34:43","guid":{"rendered":"http:\/\/local.brightwhiz\/?p=9339"},"modified":"2021-12-04T06:46:02","modified_gmt":"2021-12-04T06:46:02","slug":"change-html5-input-placeholder-color-css","status":"publish","type":"post","link":"http:\/\/local.brightwhiz\/change-html5-input-placeholder-color-css\/","title":{"rendered":"How to Change an HTML5 Input’s Placeholder Color With CSS"},"content":{"rendered":"\n

Yes, there is a way to change the color of the placeholder text in your HTML5<\/a> form inputs. This can be done by using the ::placeholder<\/strong><\/em> pseudo-element.<\/p>\n\n\n\n

You would generally use it like so:<\/p>\n\n\n\n

::placeholder { \/* Most modern browsers support this *\/\n   color:    #a9a9a9;\n}<\/code><\/pre>\n\n\n\n

<\/p>\n\n\n\n

For backward compatibility, it is good to know that there are some caveats to be aware of.<\/p>\n\n\n\n