HTML and CSS Reference
In-Depth Information
You've greatly extended the scope of the survey form through the use of selection lists,
option buttons, text area boxes, and check boxes. In the next session, you'll continue to
work on the survey form by exploring many of the new HTML5 data types, and you'll
learn how to validate the form data to ensure that users enter their data correctly.
Session 6.2 Quick Check
1.
Provide the code to create a selection list for the
State
field limited to the
option text
California
,
Nevada
,
Oregon
, and
Washington
.
2.
What attribute would you add to the code in the previous question to make
Oregon
the default value for the
State
field?
3.
For the code in Question 1, what attribute would you add to the code to display
all of the possible field values in the selection list?
4.
How would you modify the code in Question 1 to allow for multiple selections?
5.
Specify the code to create two option buttons for the
Computer
field with the
values
PC
and
Mac
.
6.
In the previous question, what attribute would you add to the code to make
PC
the default value for the
Computer
field?
7.
Specify the code to create a text area box for the
Memo
field that displays 10 lines
of text, each of which displays up to 40 characters.
8.
Specify the code to create a check box and a label for the
Computer
field. The text
of the label should be
I use a PC
and the value of the check box should be
Yes
.