Web Design

(Nancy Kaufman) #1

254


Add a Text Field ...................................................


3 Type <input.
4 Type type=”text”.

1 In your editor, open an HTML
document that contains a
<form> tag.
2 Between the opening and
closing form tags, type text
as a label for the field.

Add a Text Field


T


he most common form control by far is the single-line text field. You can add a text field to your
page through the HTML <input> tag. As you will see, however, most of the form controls use

that tag, so you also need to provide a type attribute, set to a value of text. Also required is


a name attribute, the value of which is used by the server-side script in processing this field. The


name attribute’s value should be a single, descriptive word that begins with a letter and contains


only letters, numbers, and underscore characters.


2


1


3 4

Free download pdf