<!DOCTYPE html> <html> <link rel='stylesheet' type='text/css' href='style.css'> <style> [placeholder="bar"]::-moz-placeholder, [placeholder="foo"]::placeholder { text-align: center; } </style> <body> <input placeholder='foo'> <input placeholder='bar'> </body> </html>