Web Design
Mobile Internet
Brand Design
Innovative
News
Encyclopedias

How to Create Forms in Website Construction Tutorial

Date:2016-12-12 Source: Shangpin China Type: website encyclopedia
Word Size: small   medium   big

The form is the data entry for the browser to communicate with the server. The form in the browser contains Website construction A form attribute area. Form attributes are attributes that allow users to enter various types of information in a form (such as text boxes, password boxes, drop-down lists, radio buttons, check boxes, etc.).

Forms are defined with<form>. For example, the following code defines a text box form:
 <form>Definition


Save the above code as "form. htm" and open it in a browser, as shown in Figure 1.10.
 Form.htm Form

The form itself is not visible. In addition, in most browsers, the default width of the text box is 20 characters.

The most commonly used form tag is<input>. The type of Input is specified with the type attribute. The most common input types are explained below.

1. Radio button

 Radio button code

Save the above code as "radio. htm", open it with a browser, and the result is as shown in Figure 1.11.
 Radio.htm Click Button

Radio button refers to multiple selection boxes, but only one of them can be selected.

2. Check box
 Check box code

Save the above code as "checkbox. htm", open it with a browser, and the result is shown in Figure 1.12. The check box indicates that multiple codes can be selected.
 check box

3. Password box
 Code of password box

Save the above code as "password. htm" and open it with a browser, as shown in Figure 1.13.
 Password box

4. Drop down list

 Drop down list code

Save the above code as "select. htm" and open it with a browser, as shown in Figure 1.14.
 Drop down list

5. Pre selected drop-down list
 Pre selected drop-down list code

Save the above code as "selected. htm" and open it with a browser, as shown in Figure 1.15.
 Pre selected drop-down list

Adding "selected" in option means that the top is selected in advance, so that the item is selected by default in the drop-down list.

6. Text Field
 Text field code

Save the above code as "textarea. htm" and open it with browsing material. The result is shown in Figure 1.16. The rows attribute refers to the number of lines, and the cols attribute refers to the number of words displayed in a line.
 Text Field

7. Buttons
 Button code

Save the above code as "submit. htm" and open it with a browser, as shown in Figure 1.17.
 Button
The normal button can be used anywhere, and the submit button is only used for form submission.


Please contact our consultant

+86 10-60259772

Please provide your contact number. The project manager of shangpin China will contact you as soon as possible.