The idea behind placeholders. Placeholder styling with css By default, placeholder text in inputs has a light gray color(if the browsers support) and which appears in an input field until the user puts focus on the field. change placeholder text color of textarea. Change an HTML5 input placeholder color with CSS In most of the browsers, the placeholder (in input tag) is of grey color, to change the color of this placeholder, non-standard ::placeholder selectors can be used, by which implement the color attribute in that particular selector. Note that :placeholder-shown is a pseudo-class (it’s an element in a particular state) and ::placeholder is a pseudo-element (a visible thing that isn’t really in the DOM).

The key to applying special colors and other styling to an HTML input's placeholder text is defining unique rules for the ::placeholder pseudo elements. Text-based s and the