introduction to web programming The <Input> Tag The basic set of interface widgets is defined using the <INPUT> tag.

There are several <INPUT> types offering different GUI options. Each of them has its own set of specialized attributes that define its operation.

However, all <INPUT> tags share two common attributes: TYPE and NAME

The TYPE attribute defines what type of interface widget the <INPUT> tag will define.

The NAME attribute specifies the variable name that the browser should use for this widget when it prepares the name/value pairs in the HTTP request.

Thus, the following generic input tag would create a text field interface widget (we will talk more about the text field widget in just a bit) and assign it to the name "fname"

    <INPUT TYPE = "TEXT" NAME = "fname">

When the user enters data into the input widget, that data will be paired with the name as the VALUE portion of a name/value pair and be encoded for the HTTP request.

Previous | Next | Table of Contents