+ 3

How to align names in HTML form?

Hi everybody! I am learning HTML. I want to know how to align names in forms. The code I am using is: <!DOCTYPE html> <html> <head> <title>My Blog</title> <link href="https://fonts.googleapis.com/css?family=Handlee" rel="stylesheet"> </head> <body> <!-- Form section start --> <div class="section"> <h1><span>Contact Me</span></h1> <form> Name: <input name="name" type="text" /><br/> Email: <input name="email" type="email" /><br/> Message: <textarea name="message" ></textarea> <input type="submit" value="SEND" class="submit" /> </form> </div> <!-- Form section end --> </body> </html> The names(Name,email,message) appear out of alignment.How can I correct it? I am using Solo Learn online HTML editor https://code.sololearn.com/1149/#html

4th Aug 2018, 12:15 PM
Sanyog Jain
3 Respuestas
+ 2
You should add label tag to Name, Email and Message and add style to label label { display: inline-block; min-width: 80px; } https://code.sololearn.com/WaLyIVgAIhnw/?ref=app
4th Aug 2018, 1:18 PM
Calviղ
Calviղ - avatar
+ 11
input{ text-align:center }
4th Aug 2018, 1:16 PM
Lương Văn Tuấn
Lương Văn Tuấn - avatar
+ 2
Thank you very much
4th Aug 2018, 1:20 PM
Sanyog Jain