HTML Editing Notes 3

Source: Internet
Author: User

Form

1. Syntax

<form method= "Get|post" action= "where data is submitted" >

Form content

</form>

2.input Label Common Properties

<input name= "label name" type= "label type" value= "label default"/>

Size: Width of text box

MaxLength: Enter the length of the character of the text box

Checked: Default selection for radio boxes and check boxes

Selected: Default selection for drop-down box

3. Common label types

Text//textbox

password//Password Box

Radio//radio button

checkbox//check box

Button//Buttons

Submit//Commit button

Reset/Reset button

URL//Only enter URL

Email//Can only enter the mailbox

Number//can only enter numbers

File//Files field

Range//Slider

Search//Searching box

Other labels

<select>: drop-down box

<option></option> Options

</select>

<textarea></textarea> text fields

Note: The name attribute values in the radio and checkbox need to be consistent in order to achieve the effect of single or multiple selection.

4. Advanced application of the form

Hidden//hidden fields

ReadOnly//Read-only

Disabled//disable

5. Labeling of form elements

Cases:

<label for= "id value" > Male </label>

<input type= "Radio" id= "id value"/>

6. Method of primary validation of forms

Placeholder//Tips

Required//Required fields

Pattern//Regular expression (input content must conform to the requirements of this expression)

HTML Editing Notes 3

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.