Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <title>Title of the document</title> <style> input[type="email"]::placeholder { text-align: center; } input[type="text"]::placeholder { text-align: right; } input[type="tel"]::placeholder { text-align: left; } body { text-align: center; } label { display: block; margin-bottom: 20px; } </style> </head> <body> <h1>Placeholder Text Alignment</h1> <form action="/form/submit" method="post"> <label>Center Alignment <br> <input type="email" placeholder="Email"> </label> <label>Right Alignment <br> <input type="text" placeholder="Name"> </label> <label>Left Alignment <br> <input type="tel" placeholder="Phone Number"> </label> </form> </body> </html>