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;
}

Example

HTML

<input placeholder="Type something here!">

CSS

input:-moz-placeholder {
  color: red;
  font-style: italic;
}

Result

Specifications

Not part of any specification.

Browser compatibility

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: mfluehr,