Styling placeholder text in HTML5

Another quick tip for styling input elements in HTML5.  To style placeholder text, you can use the following CSS:

::-webkit-input-placeholder { color:#282218; }
:-moz-placeholder { color:#282218; }

That’s it!  I assume that, once it’s supported by more browsers, it will change to input-placeholder or just placeholder.  We’ll have to wait and see on that one.

Comments

    peterson |

    i just want to say nothing. it’s good. that’s all.