Detailed explanation of parameters and attributes of form in HTML

Y2J
Release: 2017-05-20 10:26:24
Original
4754 people have browsed it

Example

First name:

Last name:

Copy after login

Browser support

IE

1.Firefox

2.Chrome

3.Safari

4. Opera

All browsers support the

tag.

Definition and Usage

The

tag is used to create HTML forms for user input.

Forms can contain input elements, such as text fields, check boxes, radio buttons, submit buttons, etc.

The form can also contain menu, textarea, fieldset, legend and label elements.

Forms are used to transmit data to the server.

Tips and Notes

Note: The form element is a block-level element, and line breaks will occur before and after it.

Differences between HTML and XHTML

NONE

Attributes

new : New attributes in HTML5.

Detailed explanation of parameters and attributes of form in HTML

Description

Possible values ​​of the enctype attribute:

1.application/x-www -form-urlencoded

2. multipart/form-data

3.text/plain

Global Attributes

The

tag supports global attributes in HTML.

Event attributes

tag supports event attributes in HTML.

TIY Example

Text fields

This example demonstrates how to create a text field in an HTML page. The user can write text in the text field.

Password field

This example demonstrates how to create an HTML password field.

Check box

This example demonstrates how to create a text box in an HTML page. The user can check or uncheck the checkbox.

Radio Button

This example demonstrates how to create a radio button in HTML.

Simple drop-down list

This example demonstrates how to create a simple drop-down list box in an HTML page. The drop-down list box is a selectable list.

Another drop-down list

This example demonstrates how to create a simple drop-down list with preselected values. (Note: Preselected values ​​refer to pre-specified preferences.)

Textarea

This example demonstrates how to create a text area (multi-line text input control ). The user can write text in the text field. In a text field, there is no limit to the number of characters that can be written.

Create button

This example demonstrates how to create a button. You can customize the text on the button.

Fieldset around data

This example demonstrates how to draw a box with a title around the data.

Form with input box and confirmation button

This example demonstrates how to add a form to the page. This form contains two input boxes and a confirm button.

Form with checkboxes

This form contains two checkboxes and a confirm button.

Form with radio buttons

This form contains two radio buttons and a confirmation button.

Sending an email from a form

This example demonstrates how to send an email from a form.

【Related Recommendations】

1. HTML Free Video Tutorial

2. Detailed explanation of the method attribute in the form tag

3. Detailed introduction to HTML forms

4. Detailed explanation of form The working process of the form

5. Take you to master the table and form forms in HTML

The above is the detailed content of Detailed explanation of parameters and attributes of form in HTML. 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
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!