CIS 3030 Chapter 6
Provide the code to create a form with the name registration that accesses the CGI script at
www.redballpizza.com/cgi-bin/registration using the post method. - correct answer-<form
name="registration"
action="www.redballpizza.com/cgi-bin/registration"
method="post">
</form>
What different roles do the name and id attributes assume when applied to the following
input element?
<input id="lastName" name="lastName" /> - correct answer-The name attribute provides the
name of the data field, while the id attribute provides the id for the
control element in which the user enters the field value.
Provide the code to create a field set containing the legend text Contact Information. -
correct answer-<fieldset>
<legend>Contact Information</legend>
</fieldset>
Provide the code to create an input box for the data field custPassword that will prevent the
text
of the user's password from being displayed on the screen as it is typed. - correct
answer-<input name="custPassword" type="password" />
What are two ways of associating a field label with a control element? - correct answer-By
either nesting the control element within a label element or by using the for attribute to
associate
a label with a control element by its id.
Provide the code to create a field label with the text User Name that is associated with the
input box
with the id userinput. - correct answer-<label for="userinput">User Name</label>
Provide the code to create an input box for the country field with the default text United
States. - correct answer-<input name="country value = "United States" />
Provide the code to create an input box for the socialSecurity field. Use HTML attributes to
set the
width of the box to 11 characters and to display the placeholder text nnn-nn-nnnn. - correct
answer-<input name="socialSecurity" size="11"
placeholder="nnn-nn-nnnn" />
Provide the code to create a selection list for the State field limited to the option text
California,
Provide the code to create a form with the name registration that accesses the CGI script at
www.redballpizza.com/cgi-bin/registration using the post method. - correct answer-<form
name="registration"
action="www.redballpizza.com/cgi-bin/registration"
method="post">
</form>
What different roles do the name and id attributes assume when applied to the following
input element?
<input id="lastName" name="lastName" /> - correct answer-The name attribute provides the
name of the data field, while the id attribute provides the id for the
control element in which the user enters the field value.
Provide the code to create a field set containing the legend text Contact Information. -
correct answer-<fieldset>
<legend>Contact Information</legend>
</fieldset>
Provide the code to create an input box for the data field custPassword that will prevent the
text
of the user's password from being displayed on the screen as it is typed. - correct
answer-<input name="custPassword" type="password" />
What are two ways of associating a field label with a control element? - correct answer-By
either nesting the control element within a label element or by using the for attribute to
associate
a label with a control element by its id.
Provide the code to create a field label with the text User Name that is associated with the
input box
with the id userinput. - correct answer-<label for="userinput">User Name</label>
Provide the code to create an input box for the country field with the default text United
States. - correct answer-<input name="country value = "United States" />
Provide the code to create an input box for the socialSecurity field. Use HTML attributes to
set the
width of the box to 11 characters and to display the placeholder text nnn-nn-nnnn. - correct
answer-<input name="socialSecurity" size="11"
placeholder="nnn-nn-nnnn" />
Provide the code to create a selection list for the State field limited to the option text
California,