form of HTML CSS

Source: Internet
Author: User

Form forms are often used to collect input from non-homogeneous users, allowing users to collect: text field (textbox), drop-down list (select), Radio box (radio), check box (checkbox), and button action

Form Labels
label Description
<form> Define a form for user input
<input> Defining input fields
<textarea> Define a text field (a multiline input control)
<label> Define a control's label
<fieldset> Defining fields
<legend> Defining the title of a field
<select> Define a selection list
<optgroup> Defining an option group
<option> Define options in the drop-down list
<button> Define a button



Most form labels are input tags, and the input type is defined (type).

Example:<form>

<input type= "text" name= "First_text" >

<input type= ' text ' name= "address" value= "Guangdong" > with the Value property when a default value is required

                <input type= "Radio" name= "surname" value= "Boy";

<input type= "Radio" name= "surname" value= "Boy" checked= "selected "/> (selected by default) radio

<input type= "checkbox" Name= "Tiger" >

<input type= "checkbox" name= "place name", value= "Jiangxi " checked= "selected"> (Default selected) multiple selection


The element to which the drop-down list is used is: The Select property is: Option

Cases:

<select>

<option value= "Dongfong" > Dongfeng </option>

<option value= "QQ" selected= "select" > Send Rui </option> selected default select attribute <option value= " Jili "> Geely </option>

</select>

</form>

650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M02/77/08/wKiom1ZhR2KjC4zIAABAs0RUJ1Q625.jpg "title=" 11.jpg "alt=" Wkiom1zhr2kjc4ziaabas0ruj1q625.jpg "/>

This example shows how to draw a box with a caption around the data.

<form>

<fieldset>

<legend> Health Information </legend>

Height: <input type= "text"/>

Measurements: <input type= "text"/>

</fieldset>

</form>

Three properties of button buttons

Submit The button is the Submit button (except Internet Explorer, which is the default value for other browsers).
button The button is a clickable button (the default value for Internet Explorer).
Reset The button is the reset button (clears the form data).
<form action= "form_action.asp" method= "get" > First name: <input type= "text" name= "fname"/> Last Name: <i Nput type= "text" name= "lname"/> <button type= "Submit" value= "Submit" >Submit</button> <button type= " Reset "value=" reset ">Reset</button></form>



This article is from the "Overlord Collected Works '" blog, please be sure to keep this source http://zhangtainren.blog.51cto.com/448826/1719670

form of HTML CSS

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.