Chapter 11. Building Online Forms

In this lesson, you’ll learn how to create Web forms that enable you to get input from your visitors.

Creating Forms

You’ve seen forms on the Web, but I’ll bet you didn’t know they were so easy to create. I want to point out a couple of things for you to keep track of as you read this section and then you’ll create a form.

  • Forms are made up of fields (that you want the user to fill out) and buttons (to perform actions such as submit and reset).

  • Every field (<input type="type" />) should have name and id attributes as well.

  • Every field can be set to have a default value (a pre-selected option that the users can overwrite if they want); many also can be set to validate the data the user enters.

  • Every form requires a Submit ...

Get Sams Teach Yourself HTML in 10 Minutes, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.