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.

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.

Browser compatibility

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support No support

4.0 (2.0)[1]
Removed in 51.0 (51.0)[2]

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.

See also

Document Tags and Contributors

Last updated by: chrisdavidmills,