Snipps by Patrik

How to change an HTML5 input’s placeholder color with CSS?

Sometimes, we want to change an HTML5 input’s placeholder color with CSS.

To change an HTML5 input’s placeholder color with CSS, we use the ::placeholder selector.

For instance, to set the input placeholder’s color to #909 we write:

::placeholder {
  color: #909;
}

Comments

Leave a Comment

All fields are required. Your email address will not be published.