HTML and CSS Reference
In-Depth Information
Creating a Form
Forms turn the Web into a two-way medium. Without forms, website owners could never hear
directly from their site visitors outside of other forms of communication. Forms are essential
to surveys, polls, contact requests, and online shopping. In this lesson, you learn the basics of
how forms are structured as well as the specifics for implementing the key form elements.
G ForMs
A form is basically made of four parts:
<form> tag
Form controls, such as the
<input> tag
Labels, which identify the form elements
A trigger, typically a button form element, that submits the form
A simple form, in code, would look like this:
<input type=”text” name=”fullName”
<input type=”button” value=”Submit” />
When displayed in the browser, the label, text form
field, and button are presented all in a single line,
as shown in Figure 19-1.
FiGure 19-1
Search WWH ::

Custom Search