Home > Article > Web Front-end > A detailed introduction to HTML forms and input
HTML Form
A form is an area containing form elements.
Form elements allow users to enter content in the form, such as text areas, drop-down lists, radio-buttons, checkboxes, etc.
Forms are set up using the form tag
The most commonly used form tag is the input tag ().
Input types are defined by the type attribute (type). The most frequently used input types are as follows:
The text field is set through the tag. When the user types letters, numbers, etc. in the form, the text field is used.
The password field is defined with the tag :
tag defines the form radio button options
The browser display effect is as follows:
defines a checkbox. The user needs to select one or several options from a number of given choices.
The browser display effect is as follows:
defines the submit button.
When the user clicks the confirm button, the form's contents are transferred to another file. The form's action attribute defines the file name of the destination file. The file defined by the action attribute usually performs related processing on the input data received. :
New : HTML5New tag
Label | describe |
---|---|
Define a form for user input | |
Define input fields | |
Define a text field (a multi-line inputcontrol) | |
Defines the label of the element, usually the input title | |
Defines a set of related form elements and encloses them using an outer frame | |
Defines the title of the | |
Defined drop-down option list | |
Define option group | |
Define options in drop-down list | |
Define a click button | |
Specify a predefined list of input control options | |
|
Defines the form's key pair generator fields |
Define a calculation result |
The above is the detailed content of A detailed introduction to HTML forms and input. For more information, please follow other related articles on the PHP Chinese website!