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 has been removed from the Web standards. Though some browsers may still support it, it is in the process of being dropped. Avoid using it and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

Note: The ::-moz-placeholder pseudo-element was introduced as a replacement for the :-moz-placeholder pseudo-class that was deprecated in Firefox 19. Since Firefox 51, this feature is also available as the standard ::placeholder pseudo-element.

The ::-moz-placeholder CSS pseudo-element 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.

input::-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 (WebKit)
Basic support ? 19.0 (19.0)[1][2] ? ? ?
Feature Android Firefox Mobile (Gecko) Firefox OS IE Phone Opera Mobile Safari Mobile
Basic support ? 19.0 (19.0)[1][2] ? ? ? ?

[1] Firefox applies a default style of opacity: 0.54 to placeholder text. See bug 556145. Most other major browsers don't currently share this particular default style for their placeholder text pseudo-elements or pseudo-classes.

[2] Before version 19, Gecko implemented this functionality with a pseudo-class :-moz-placeholder. See bug 737786.

See also

Document Tags and Contributors

Last updated by: mfluehr,