<label> tags
<form>
<label for="male">Male</label>
<input type="radio" name"sex" id="male"/>
<br>
<label for="femal">Female</label>
<input type="radio" name="sex" id="female"/>
</form>
The <label> tag defines the callout (tag) for the INPUT element.
The label element does not present any special effects to the user. However, it improves usability for the user of the mouse. This control is triggered if you tap text inside a LABEL element. That is, when the user selects the label, the browser automatically shifts the focus to the label-related form controls.
The For property of the <label> tag should be the same as the id attribute of the related element.
<input>
Text fields: <input type= "text" name= "" > Password field: <input type= "password" name= "> check box: <input type=" checkbox "Name=" "& Gt;<input type= "checkbox" Name= "" > Radio Box: <input type= "Radio" checked= "checked" name= "sex" value= "male" > <input type= "Radio" name= "Sex" value= "female" > The name value is the same as the drop-down list:
<form>
<select name="cars">
<option value="volvo">volvo</option>
<option value="saab">saab</option>
<option value="fiat">fiat</option>
<option value="audi">audi</option>
</select>
</form>
Drop-down list with preselected values: Add selected= "Selected" text field: <textarea rows= "ten" cols= ">this</textarea>"button: <input type= "button" value= "Hello World" > fieldset around the data: Draw a box with a caption:
<form>
<fieldset>
<legend>健康信息</legend>
身高:<input type="text">
</fieldset>
</form>
form with input box and confirmation button
<form action="/example/html/form_action.asp" method="get">
<p>First name:<input type="text" name="fname"></p>
<p>Last name:<input type="text" name="lname"></p>
<input type="submit" value="submit">
</form>
<p>请单击确认按钮,输入会发送到服务器上名为"form_action.asp"的页面。</p>
Change the input box to a check box to submit an e-mail message from the form
<form action="MAILTO:[email protected]" method="post" enctype="text/plain">
这个表单会把电子邮件发送到W3School。
<input type = "text" name= "name" value= size=" all "
<input type = "text" name= "mail" value= size=" all "
<input type="text" name="comment" value="yourcomment" size="40">
<input type="submit" value="submit">
<input type="reset" value="reset">
</form>
<tabel> Tags <tr><td></td><td></td></tr> row two-column table border <table border= "1" > </table> The value of border indicates that the border size header:<th></th> instead of the font in <td></td> <th></th> automatically bold with the caption of the table <caption ></caption>Cross-column: <td colspan= "2" ></td>cross-line: <td rowspan= "2" ></td>cellpadding= "" Form Fillcellspadding Cell paddingadd a background color or background image to a table<table border= "1" bgcolor= "Red" ></table><table border= "1" bgckground= "" ></table>
label, input, table label