HTML and CSS Reference
In-Depth Information
The following step adds text boxes to the form.
If necessary, click line 19 and
descriptive labels tells
user what information
to enter
indent one t a b stop.
input control
type set to text
Enter the HTML code shown
in Table 6-5 and then
press the e n t e r key twice
(Figure 6-10).
insertion point
on line 23 and
tabbed once
How do I know what size to make
each field?
Determine a reasonable field size
for the various input areas. For
instance, it would not be wise to
allow only 10 characters for the
last name, because last names can
be more than 10 characters. To
improve your judgment for field
sizes, observe online and paper forms that you complete. Also, think of long street
or city names and try those in the forms that you create.
three text
boxes added
for listener
input tag used for
many form controls
name attribute
describes text box
size indicates number
of characters that
appear in text box
Figure 6-10
What is the default value if I do not specify the type in my <input /> tag?
The default type for the <input /> tag is a text box. Therefore, if the type attribute
is not used in the <input /> tag, it creates a text box.
To Save an HTML File
Because you opened a file that was already created, you can press the ctrl + s keys
to save what you have done so far. Do this frequently throughout your projects.
With the USB flash drive connected to one of the computer's USB ports, hold down the
c t r l key and then press the s key.
Other Ways
1. Click File, then Save
2. Click Save icon on
Notepad++ toolbar
Adding Check Boxes
The next step is to add six check boxes to the form. Check boxes are similar to radio
buttons, except they allow multiple options to be selected. Radio buttons should be used
when only one option can be selected, while check boxes should be used when the user
can select more than one option.
The HTML code below shows an example of the code used to add a check box to a form:
<input name="musictype" type="checkbox" value="country"
Search WWH ::

Custom Search