<html>
<head>
<title>form</title>
</head>
<body>
<form>
<table align="center">
<tr>
<th colspan="2">Register here</th>
</tr>
<tr>
<td>First name :</td>
<td><input type="text"/></td>
</tr>
<tr>
<td>Last name :</td>
<td><input type="text"/></td>
</tr>
<tr>
<td>email:</td>
<td><input type="text"/></td>
</tr>
<tr>
<td>DOB :</td>
<td><input type="date"/></td>
</tr>
<tr>
<td>Gender :</td>
<td><input type="radio" name="gen"/> Male
<input type="radio" name="gen"/> Female</td>
</tr>
<!--here name attribute of input tag is used to creat
a group here gen such that i can only click on on either
male or female-->
<tr>
<td>Qualification :</td>
<td>
<input type="checkbox" name="q"/> B.Tech
<input type="checkbox" name="q"/> M.Tech
<input type="checkbox" name="q"/> Phd
</td>
</tr>
<!--here we can or we can not give the name attribute
i.e. it is optional-->
<tr>
<td> Category : </td>
<td>
<select>
<option>Select</option>
<option>General</option>
<option>Obc</option>
<option>sc</option>
<option>st</option>
</select>
</td>
</tr>
<!--here select tag is used instead of input tag to show
only chosen value also remember select tag is parent tag
and option tag is its child tag-->
<!-- here option tag is used because we can only select
options-->
<tr>
<td>Image upload : </td>
<td>
<input type="file"/>
</td>
</tr>
<tr>
<td>About you</td>
<td>
<textarea cols="30" rows="5"> </textarea>
</td>
</tr>
<!--<textarea name="" id="" cols="" rows=""> </textarea>-->
<tr>
<td></td>
<td><input type="submit" value="sign in"/></td>
</tr>
<!--This tag if i want to align it to right side or to the
second column since here are two columns because two
td tag is used inside the tr tag-->
</table>
</form>
</body>
</html>
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter