HTML and CSS Reference
The following step adds text boxes to the form.
If necessary, click line 19 and
descriptive labels tells
user what information
indent one t a b stop.
type set to text
Enter the HTML code shown
in Table 6-5 and then
press the e n t e r key twice
on line 23 and
How do I know what size to make
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.
input tag used for
many form controls
describes text box
size indicates number
of characters that
appear in text box
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.
1. Click File, then Save
2. Click Save icon on
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"