Home >>HTML Tutorial >HTML Login Form

HTML Login Form

Login Form in HTML5

Through this tutorial you learn how to create a Login Form using HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">


<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title>Untitled Document</title>



<table width="345" border="1" bgcolor="#99CC00">


<th height="34">Enter your username</th>

<td><input type="email"/></td>



<th height="33">Enter your passowrd</th>

<td><input type="password"/></td>



<th height="39" colspan="2"><input type="submit" value="SignIn"/>

<a href="#">SignUp</a></th>




Output Login Page in HTML

Try it Yourself

We begin our program with start of HTML script. body tag embedded inside the <html> tag. where we create our table. set width attribute of table tag with (value="345"),another attribute bgcolor is used to set background color. Create a textbox of user name field. first create row using(<tr>). set table heading(<th>), and a column (<tr>) inside this we create a textbox using <input> script. we create another textbox of password field within inside <td> tag. create a submit button using <input type="submit"> tag. merge two column using colspan=2. and signup declare inside anchor <a> tag to make it link. close body (</body>) tag and HTML (</html>) tag. and output will become