Page 12 - LoudOffice_Guide-to-HTML_Part-II_Advanced.PDF
P. 12
Most of the time, the difference between the two methods is negligible. However, it
is recommended that you use the p o s t method.
The <input> Tag
The input tag is the main source of input for HTML forms. There are many different type of
forms as will be displayed below.
Text Input Tags
Text entry fields allow the user to enter non-formatted text. Text fields are created using
the < i n p u t > tag. The < i n p u t > tag takes a number of parameter:
Ø t y p e : This parameter defines the type of input field. There are three basic values:
t e x t – This identifies a ‘regular’ text field. An input box will be visible to the
o
user and all data entered therein will be displayed.
– This identifies a ‘password’ text field. An input box will be
o p a s s w o r d
visible, but when a user types data into it, only asterisks (*) will be displayed.
– This identifies a non-visible text field. It does not take input
h i d d e n
o
directly from a user, and is not visible on the page being displayed (it is
visible as part of the HTML code).
Ø v a l u e : For text and password fields, this parameter allows the website designer to
designate a default value that can be overridden by the website surfer. It must be
included for hidden fields.
Ø n a m e : This parameter is required so that programs can identify each field separately.
Ø s i z e : This parameter controls the size (“width”) of the text field.
Ø m a x l e n g t h : This parameter controls the maximum amount of data (in terms of field
length) that can be included in a text field.
Check Boxes
The check box is a special type of input that allows the website user to toggle the particular
field on (the check box is full) or off (the check box is empty). The structure of the tag is:
< i n p u t t y p e = “ c h e c k b o x ” n a m e = ” . . . ” v a l u e = ” . . . ” >
This input tag can take a special attribute, c h e c k e d , that sets the default value of the
check box to on. Website users are able to choose to check off as many (or as few)
checkboxes as they want.
Radio Buttons
LoudOffice.com Guide to HTML – Part II Page 12