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: