", "", "

What are the tags in html forms

The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.

HTML forms are used to collect different types of user input. Form elements refer to different types of input elements, check boxes, radio buttons, submit buttons, etc.

HTML form tags:

Tags Description
Define the form for user input
Define the input field
Define the text area (a multi-line input control)
DefinedThe label of the element, usually the input title
defines a group of related form elements and uses an outer frame to enclose them
Defines the title of the
element
Define the drop-down option list
Define the option group
Define the options in the drop-down list
Define a click button
Specifies a predefined input control option list
Defines the key pair generator field of the form
Define a calculation result

Extended information:element

element is the most important form element.

Elements have many forms, according to different type attributes.

1. Text Fields

The text field is set through thetag. When the user wants to type letters, numbers, etc. in the form , the text field will be used.

First name:
Last name:
Copy after login

The browser displays the following:

What are the tags in html forms

Note: The form itself is not visible. Also, in most browsers, the default width of a text field is 20 characters.

2. Password field

The password field is defined by the tag:

Password:
Copy after login

The browser display effect is as follows:

What are the tags in html forms

Note: Password field characters will not be displayed in plain text, but will be replaced by asterisks or dots.

3. Radio Buttons

tag defines the form radio button options

Male
Female
Copy after login

Browser display effect As follows:

What are the tags in html forms

4. Checkboxes

defines the checkbox. Users need to start from Select one or several options from a number of given choices.

I have a bike
I have a car
Copy after login

The browser display effect is as follows:

What are the tags in html forms

5. Submit Button

Defines the submit button.

When the user clicks the confirm button, the content of the form will be 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:
Copy after login

The browser display effect is as follows:

What are the tags in html forms

If you type a few letters in the text box above and click the confirm button, then enter the data The page that will be sent to "html_form_action.php". This page will display the entered results.

Recommended tutorial: "html video tutorial"

The above is the detailed content of What are the tags in html forms. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Previous article:What is css system Next article:How to make pictures brighter in html
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 Articles by Author
Latest Issues
Related Topics
More>
Popular Recommendations
Popular Tutorials
More>
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!