The <input> Tag

The <input> tag is used to actually create most of the HTML form fields. The type attribute of this tag is used to indicate what type of field is being created, and other attributes are used to set the parameters for that field. The types of input fields available are text fields, password fields, check boxes, radio buttons, hidden fields, and file upload fields. The <input> tag is also used to create Submit and Reset buttons. I’m going to talk about each of them individually.

First, however, I want to discuss two attributes that are common to all input fields, name and value. When the data in a form is sent to the Web server, it is organized in name/value pairs. The name attribute allows you to identify each field on the form. ...

Get Sams Teach Yourself CGI in 24 Hours, Second 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.