代码
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>实战用表单布局</title> </head> <body> <form action="" method="post"> <table border="0" cellpadding="8" cellspacing="2" width="500" bgcolor="#b3e6b3"> <caption><h2>Register</h2></caption> <tr> <td colspan="2"><hr></td> </tr> <tr> <td>Username</td> <td><input type="text" name="username" placeholder="Username"></td> </tr> <tr> <td>Your Email</td> <td><input type="text" name="email" placeholder="Your Email"></td> </tr> <tr> <td>Password</td> <td><input type="password" name="password" placeholder="Password"></td> </tr> <tr> <td>Sex</td> <td><input type="radio" name="sex" value="male">Male <input type="radio" name="sex" value="female">Female <input type="radio" name="sex" value="secret" checked="">Secret </td> </tr> <tr> <td>Hobbs</td> <td><input type="checkbox" name="hobbs[]" value="swiming">Swiming <input type="checkbox" name="hobbs[]" value="watching">Watching TV <input type="checkbox" name="hobbs[]" value="shopping" checked="">Shopping </td> </tr> <tr> <td>City</td> <td><select name="city" id="city" > <option value="" checked>Hefei</option> <option value="">Bengbu</option> <option value="">Wuhu</option> </select></td> </tr> <tr> <td>Picture</td> <td><img src="images/1.gif" height="30" alt=""> <input type="file" name="pic" ></td> </tr> <tr> <td>Comment</td> <td> <textarea cols="40" rows="8" id="comment" name="comment" placeholder="comment"></textarea> </td> </tr> <tr> <td colspan="2"><hr></td> </tr> <tr> <td colspan="2"> <input type="submit" value="Submit"> <input type="reset" value="Reset"> </td> </tr> </table> </form> </body> </html>
手抄代码