How do you put fields and a button so people can submit information from a fill-in form on your web page?
This is done inside a "form". You can have several types of controls inside a form. The most basic form has some text fields where the user can input some information, and a button to submit. Most forms will have more functionality. They may contain a button to clear or reset the fields in case the user wants to start all over.
The fields (described below) should fall between the form open and close tags:
Common fields and controls in HTML forms
All fields should have a name. The name for the field and the data it contains will be passed to the script which processes the data.
The Text Field: It is used for inputting one line of limited information. An example would be a place where someone can input their name or email address. The length of a text field is usually limited in length (by the maxlength argument). The "size" argument tells how long the field will appear to be on the screen. Below is a simple text field:
The Check box: This could be used for Yes / No type questions, or you can have several check boxes if people are allowed to make one or more selections.
The Drop-Down (select) list : When people click a little down-arrow, a list drops down that the user can select one option from.
The Submit Button: Clicking this will send the results to the script defined in the "Action" property of the form.
Here is a simple form with a field for first name, last name, email address and comment that will be sent to a mail script to be mailed to the websites' owner.
The form elements in this example are placed in a table so they line up nicely.
Enter your comments here.