<! DOCTYPE html>
<meta charset= "UTF-8" >
<title>Document</title>
<body>
<table cellpadding= "2" >
<tr>
<TD align= "right" ><label for= "username" >  User name:</label></td>
<td><input type= "text" id= "username" ></td>
</tr>
<tr>
<TD align= "right" ><label for= "password" >  secret   code:</label></td>
<td><input type= "password" id= "password" ></td>
</tr>
<tr>
<TD align= "right" ><label for= "password" > Confirm password:</label></td>
<td><input type= "password" id= "password" ></td>
</tr>
<tr>
<TD align= "right" >   gender:</td>
<td><input type= "Radio" name= "Sex" > Male <input type= "Radio" name= "Sex" > Women </td>
</tr>
<tr>
<TD align= "Right" >   hobby:</td>
<td>
<input type= "checkbox" name= "hobby" 1> listen to music
<input type= "checkbox" name= "hobby" 2> Watch Movie
<input type= "checkbox" name= "hobby" 3> play games
</td>
</tr>
<tr>
<TD align= "Right" > Your city:</td>
<td>
<select>
<option > Guangzhou </option>
</select>
</td>
</tr>
<tr>
<TD align= "Right" > Photo  :</td>
<td>
<input type= "text" name= "Mypic" >
<input type= "button" Name= "btn" value= "Browse ..." >
</td>
</tr>
<tr>
<TD align= "Right" > Profile:</td>
<td>
<textarea name= "desc" cols= "rows=" 7 "></textarea>
</td>
</tr>
<tr>
<td></td>
<td>
<input type= "Submit" Name= "sub" value= "Commit" >
<input type= "Reset" name= "res" value= "rewrite" >
</td>
</tr>
</table>
</body>
If you do not nest a table, the effect will be very messy, you will find a variety of misalignment, the page is not beautiful, the above is already used table nested well.
<label for= "username" > User name:</label>
<input type= "text" id= "username" >
/////////////
User name: <input type= "text" name= "username" >
Both of these methods look the same, but the user experience is different
First, click on the user name is effective, but pay attention to use id= "", Do not use Name= "" and there is the top and bottom name to always
The second is that there is no effect.
In addition,   is a space, and like, according to the use of personal habits
Beginner Web front-end HTML, how to make pages look neat