label, input, table label

Source: Internet
Author: User

<label> tags

  1. <form>
  2. <label for="male">Male</label>
  3. <input type="radio" name"sex" id="male"/>
  4. <br>
  5. <label for="femal">Female</label>
  6. <input type="radio" name="sex" id="female"/>
  7. </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:
  1. <form>
  2. <select name="cars">
  3. <option value="volvo">volvo</option>
  4. <option value="saab">saab</option>
  5. <option value="fiat">fiat</option>
  6. <option value="audi">audi</option>
  7. </select>
  8. </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:
    1. <form>
    2. <fieldset>
    3. <legend>健康信息</legend>
    4. 身高:<input type="text">
    5. </fieldset>
    6. </form>
form with input box and confirmation button
  1. <form action="/example/html/form_action.asp" method="get">
  2. <p>First name:<input type="text" name="fname"></p>
  3. <p>Last name:<input type="text" name="lname"></p>
  4. <input type="submit" value="submit">
  5. </form>
  6. <p>请单击确认按钮,输入会发送到服务器上名为"form_action.asp"的页面。</p>
Change the input box to a check box to submit an e-mail message from the form
  1. <form action="MAILTO:[email protected]" method="post" enctype="text/plain">
  2. 这个表单会把电子邮件发送到W3School。
  3. <input type = "text" name= "name" value= size=" all "
  4. <input type = "text" name= "mail" value= size=" all "
  5. <input type="text" name="comment" value="yourcomment" size="40">
  6. <input type="submit" value="submit">
  7. <input type="reset" value="reset">
  8. </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

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.