HTML forms and input

巴扎黑
Release: 2017-04-15 09:06:48
Original
1587 people have browsed it

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

:



.
input elements
.


HTML Form - Input Element

The most commonly used form tag is the input tag ().

Input types are defined by the type attribute (type). Most commonly used input types are as follows:


Text Fields

The text field is set through thetag. When the user types letters, numbers, etc. in the form, the text field is used.



First name:

Last name:


Password field

The password field is defined with the tag:



Password:


Radio Buttons

tag defines the form radio button options



Male

Female

The browser display effect is as follows:


Checkboxes

defines a checkbox. The user needs to select one or several options from a number of given choices.



I have a bike

I have a car

The browser display effect is as follows:


Submit Button

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. :



Username:




HTML form tag

New: HTML5 new tag

Label describe
Define a form for user input
Define input fields
Define a text field (a multi-line input control)
Defines the label of theelement, usually the input title
Defines a set of related form elements and encloses them using an outer frame
Defines the title of the
element
Defined drop-down option list
Define option group
Define the options in the drop-down list
Define a click button
New Specify a predefined list of input control options
New Defines the key pair generator fields of the form
New Define a calculation result

The above is the detailed content of HTML forms and input. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!