What is moz-placeholder

moz-placeholder refers to the old, vendor prefixed way of styling placeholder text using CSS.

HTML FAQs → What is moz-placeholder

moz-placeholder refers to the old, vendor prefixed way of styling placeholder text using CSS.

Placeholder text is the sample text you would see on an input form. For example if the input box was collecting your favourite colour, it may have the placeholder value of “purple”.

Before there was good, cross-browser support for styling placeholder text with CSS, you would specify which browser you wanted to support. With Mozilla’s Firefox you would write something like this;

input:-moz-placeholder {
  color: red;
}

This is no longer needed, and instead people are encouraged to use the unprefixed pseudo-element, which looks like this;

input::placeholder {
  color: red;
}

Recent posts View all

Rails

Dealing with multiple languages with inflections

How to have your site deal with multiple languages in inflections

Threat Intelligence JavaScript

Threat Intelligence Issue 5

Issue 5 of our Threat Intelligence information