InformIT Visual Tutorial 4: HTML Forms
After completing this tutorial you should be able to do the following:
Properly use the <FORM> tag and explain its parameters
Add text boxes, radio buttons, and check boxes to a form
Make your forms look aesthetically pleasing
In previous tutorials you learned how to create a database, populate a table in that database with data, and use SQL queries to retrieve different views of the information stored in the database. In learning about databases and SQL, you added information to the database. Now how can you get your users to insert information for you? The answer is simple: by using forms and scripts. This tutorial covers forms (see Figure 1) and the next looks at scripts.
Figure 1 What's covered in this tutorial (HTML forms).
We'll show you how to create forms "by hand." Now, it's true that you could create them using a WYSIWYG HTML editor such as Microsoft FrontPage. However, our experience is that such HTML editors don't give you the fine control you need to create really nice forms. Thus, we'll show you how to handcraft a form using an ordinary text editor. Once you learn how to build a form from scratch, you'll never go back to using an HTML editor, except maybe to quickly prototype an idea. Before we cover forms, however, you need to know how to create an HTML file and display that file in a browser.
Note: To download a zip containing the source files for this article, click here.