HTML CSS examples for CSS Form:Form
Align form to the center in HTML/CSS
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> form, h1 {<!-- w ww. j a va2 s.c om--> clear:both; max-width:81%; margin:0 auto; display:block; font-family:Comic Sans Ms; text-align:center; } </style> </head> <body> <h1 style="font-family:Comic Sans Ms;text-align:center;font-size:50pt;color:#ff00ba;">Lorem ipsum dolor sit </h1> <form> Lorem ipsu <br> <input type="text" name="userid"> <br>Lorem ipsu <br> <input type="password" name="pswrd"> <br> <br> <input style="font-family:Comic Sans Ms;" type="button" onclick="check(form)" value="Login"> <input style="font-family:Comic Sans Ms;" type="reset" value="Cancel"> </form> </body> </html>