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.
This selector can change browser to browser, example
For Chrome, Mozilla, and Opera Browsers, selectors can be implemented as
For Internet Explorer selectors can be,
For Internet Edge, it can be,
HTML Code 1:
This code shows the use of Placeholder selectors in different browsers
- In Google Chrome
- In Internet Edge
- In Internet Explorer
HTML Code 2:
This code implements placeholder selector in email attribute of input tag. Placeholder selectors can be apply to any attributes (text, tel, password, and etc) of input tag, to highlight change in color in any different attributes.
- Program to Change RGB color model to HSV color model
- HTML5 | date attribute in <input> Tag
- HTML | Change Background color using onmouseover property
- CSS | ::placeholder Selector
- How to make a placeholder for a 'select' box?
- HTML | placeholder Attribute
- How to align Placeholder Text in HTML ?
- Color N boxes using M colors such that K boxes have different color from the box on its left
- HTML5 | rp Tag
- HTML5 | rt Tag
- HTML5 | <aside> Tag
- HTML5 | <meter> Tag
- HTML5 | figcaption Tag
- HTML5 | figure Tag
- HTML5 | fieldset Tag
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.