We'll get started by taking advantage of some of the new attributes made available to us in HTML5. The great thing about these additions is that they are completely backward compatible. Browsers that don't know how to handle them will either ignore them or default to a simple text input, and our site visitors on older browsers will be able to use our forms without even knowing what they're missing.
First, a word of warning about web forms. A web form doesn't work by itself—it needs to have some fancy backend programming on a server somewhere to collect the form entries and process them, whether that means writing fields to the database or sending the form information via e-mail. Because of this, the forms we build in this chapter won't actually work—nothing will happen after clicking the Submit button on the form.
If you want to add a functioning web form to a project, you have a few options. They are as follows:
You can learn to do server-side programming to handle your form...