HTML learning 9: Form tags of common tags

Source: Internet
Author: User

HTML learning 9: Form tags of common tags

HTML forms are used to collect different types of user input.

Form tag list:

One form tag Logon Name:
Logon password:

Note that when you type characters in the password field, the browser uses the project symbol to replace these characters.

The browser displays the following results:

 

(2) Radio button (Radio Buttons)

When a user selects a single shard from a number of given options, a single shard is used. Note that you can only select one of them. You can also use attributes.

Checked = checked: select the default status for gender.

 

  

The first case is the most common, but also the second case, that is, when the website is registered as a female, the Gender option selects gender female by default.

The browser displays the following results:

 

(3) check box (Checkboxes)

The check box is used when you need to select one or more options from several given options. You can also use the property checked = checked

Select the default gender status.

 

 The browser displays the following results: 

 

(4) other input types in the input tag

1. file)

When you need to select one or more files from a given folder, the file selection box is used.

2. Form hidden component (hidden)

When user data does not need to be known by the client, it can be submitted to the server.

3 images

This image component can be used to submit data.

4 buttons

This button component allows you to customize click events.

 

  

 

The browser displays the following results:

Click to select a file:

Click:

Click the image:

3.

The browser displays the following results:

 

Thu

Health informationHeight: Weight: The browser displays the following results:

 

Five input tagsThere are two important attributes:

(Used to clear the data entered by the user)

(The button action used by the client to submit data to the server, similar to the preceding image function)

The overall code for the form label is as follows:

 

  The browser displays the following results: 

 


 

 

 


 

 

 

 

 

 

 

Related Article

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.