Almost every time you want to collect information from a visitor to your site, you need to use a form. You have probably used several different kinds of forms on different web sites, from simple search boxes, which allow you to enter keywords in order to find what you are looking for, to complex forms that allow you to order groceries or book a holiday online.
Forms on the Web bear a strong resemblance to paper forms you have to fill out. On paper, there are areas to enter text, boxes to check (or tick), options to choose from, and so on. On the Web, you can create a form by combining what are known as form controls, such as text boxes (to enter text into), checkboxes (to place a tick in), select boxes and radio buttons (to choose from different options), and so on. In this chapter you learn how each of these different types of controls can be combined into a form.
In this chapter, then, you learn:
How to create a form using the
The different types of form control you can use to make a form—such as text input boxes, radio buttons, select boxes, and submit buttons
What happens to the data a user enters
How to make your forms accessible
How to structure the content of your forms
By the end of the chapter you will be able to create all kinds of forms to collect information from visitors to your site.
What you do with the data that you collect depends upon the server your web site is hosted on. XHTML is used only to present the form to the user; it does not allow ...