Non-standard
This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.
Obsolete
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
Note: Firefox 51 replaced this feature with the standard :placeholder-shown
pseudo-class.
The :-moz-placeholder
CSS pseudo-class is a Mozilla extension that represents any form element displaying placeholder text. This lets you customize the appearance of the placeholder text, which is a translucent gray color by default.
textarea:-moz-placeholder { color: blue; }
<input placeholder="Type something here!">
input:-moz-placeholder { color: red; font-style: italic; }
Not part of any specification.
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | No support | No support | No support | No support |
Feature | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | No support | ? | No support | No support | No support |
[1] Implemented in bug 457801. The :-moz-placeholder
pseudo-class was deprecated in Firefox 19 in favor of the ::-moz-placeholder
pseudo-element.
[2] Since Firefox 51 this feature has been replaced with the standardized :placeholder-shown
pseudo-class.
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/CSS/:-moz-placeholder