Beginner Web front-end HTML, how to make pages look neat

Source: Internet
Author: User

<! DOCTYPE html>
<meta charset= "UTF-8" >
<title>Document</title>
<body>
<table cellpadding= "2" >
<tr>
&LT;TD align= "right" ><label for= "username" >&emsp; User name:</label></td>
<td><input type= "text" id= "username" ></td>
</tr>
<tr>
&LT;TD align= "right" ><label for= "password" >&emsp; secret &emsp; code:</label></td>
<td><input type= "password" id= "password" ></td>
</tr>
<tr>
&LT;TD align= "right" ><label for= "password" > Confirm password:</label></td>
<td><input type= "password" id= "password" ></td>
</tr>
<tr>
&LT;TD align= "right" >&emsp;&emsp; gender:</td>
<td><input type= "Radio" name= "Sex" > Male <input type= "Radio" name= "Sex" > Women </td>
</tr>
<tr>
&LT;TD align= "Right" >&emsp;&emsp; 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 &emsp;:</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, &emsp; is a space, and &nbsp; like, according to the use of personal habits

Beginner Web front-end HTML, how to make pages look neat

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.