Complete Answer Guide for New Perspectives on HTML CSS and XML Comprehensive 4th Edition Carey Test Bank
Complete Answer Guide for New Perspectives on HTML CSS and XML Comprehensive 4th Edition Carey Test Bank
com
https://testbankdeal.com/product/new-perspectives-on-html-
css-and-xml-comprehensive-4th-edition-carey-test-bank/
OR CLICK HERE
DOWNLOAD NOW
https://testbankdeal.com/product/new-perspectives-on-html-and-css-
comprehensive-6th-edition-carey-test-bank/
testbankdeal.com
https://testbankdeal.com/product/new-perspectives-on-xml-
comprehensive-3rd-edition-carey-test-bank/
testbankdeal.com
https://testbankdeal.com/product/new-perspectives-on-xml-
comprehensive-3rd-edition-carey-solutions-manual/
testbankdeal.com
https://testbankdeal.com/product/abcs-of-relationship-selling-through-
service-canadian-6th-edition-futrell-solutions-manual/
testbankdeal.com
Business Communication Process and Product Brief Canadian
Canadian 4th Edition Guffey Solutions Manual
https://testbankdeal.com/product/business-communication-process-and-
product-brief-canadian-canadian-4th-edition-guffey-solutions-manual/
testbankdeal.com
https://testbankdeal.com/product/psychology-of-criminal-behaviour-a-
canadian-perspective-canadian-2nd-edition-brown-test-bank/
testbankdeal.com
https://testbankdeal.com/product/economics-a-contemporary-
introduction-10th-edition-mceachern-solutions-manual/
testbankdeal.com
https://testbankdeal.com/product/payroll-accounting-2017-27th-edition-
bieg-solutions-manual/
testbankdeal.com
https://testbankdeal.com/product/taxation-of-business-
entities-2018-edition-9th-edition-spilker-solutions-manual/
testbankdeal.com
Financial Accounting 3rd Edition Weygandt Test Bank
https://testbankdeal.com/product/financial-accounting-3rd-edition-
weygandt-test-bank/
testbankdeal.com
Tutorial 6: Creating a Web Form
TRUE/FALSE
1. HTML supports tags that allow you to create forms and analyze the information submitted on forms.
2. The earliest and most common of the languages used for server-based programs are called CGI scripts,
written in a language called Perl.
3. PHP and ASP are popular languages widely used today for writing server-based programs.
4. The get method appends the form data to the end of the URL specified in the action attribute.
6. Among the attributes included with the <form> tag are attributes that include information on how to
process the form.
8. One way of organizing a form is to group similar fields into field sets.
10. Access keys can be used with hyperlinks and are particularly helpful to users with impaired motor
skills who find it difficult to use a mouse.
11. Field sets are block elements that limit the numbers of characters the text box can hold.
12. HTML allows you to formally link a label with an associated text box element for scripting purposes.
ANS: T PTS: 1 REF: HTML 408
13. Unlike a default field value, a placeholder is not stored in the data field and is not sent to the server as
a field value.
14. An access key is a single key that you type in conjunction with the Alt key for Macintosh users.
15. When the <input> tag is used to create radio buttons, the tag also creates labels for radio buttons.
18. A command button runs a command that affects the contents of the Web page or the Web browser
itself.
19. Data values do not need to be tested or validated before they are used.
20. One advantage of the current validation checks is that they occur after a user has completed and
submitted the form.
MODIFIED TRUE/FALSE
1. Input boxes are a form control element used for text and numerical entries. ____________________
2. Option lists are a form control element for long lists of options. ____________________
ANS: F, Selection
3. The earliest and most common server-based programs are CGI scripts written in a language called
Perl. ____________________
ANS: T PTS: 1 REF: HTML 398
4. The get method sends form data in a separate data stream. ____________________
5. The language used to create a server-based program depends on the Web server.
____________________
ANS: F, form
7. The <form> tag includes attributes that control how the form is processed. ____________________
8. To associate text with a control element, you can use the label element.. ____________________
9. When you link a label with an associated input box element, you use the name attribute of the field.
____________________
ANS: F, id
10. A placeholder is a numeric string that appears within the control element and provides users with
information about the kind of information accepted by the field. __________________
ANS: F, text
11. An access key is a single key that you type in conjunction with the Command key for Macintosh users,
to jump to one of the control elements in the form. ____________________
ANS: F, Control
12. A selection list is a list box that presents users with a group of possible field values for the data field.
____________________
13. Like selection list items, only one radio button can be selected at a time. ____________________
ANS: F, Unlike
14. A control element that allows extended text entries is the textarea element. ____________________
15. Input boxes with the number data type are displayed using a spinner control in which users click an up
or down arrow to increase or decrease the field value, respectively.____________________
MULTIPLE CHOICE
2. Each control element in which the user can enter information is called a(n) ____.
a. field c. value
b. index d. area
ANS: A PTS: 1 REF: HTML 397
3. Text ____ are used for extended entries that can include several lines of text.
a. areas c. rosters
b. buttons d. matrices
ANS: A PTS: 1 REF: HTML 434
13. You should check with your ISP or system administrator to find out what ____ are available and what
rights and privileges you have in working with them.
a. scripts c. passwords
b. access keys d. XMLs
ANS: A PTS: 1 REF: HTML 399
16. The ____ attribute of the <form> tag represents the older standard for identifying each form on the
page.
a. id c. name
b. identification d. what
ANS: C PTS: 1 REF: HTML 399
17. The ____ attribute has two possible values: get and post.
a. value c. method
b. id d. name
ANS: C PTS: 1 REF: HTML 400
20. If you do not include the type attribute in an <input> tag, the Web browser assumes that you want to
create a(n) ____.
a. check box c. option button
b. input box d. submit button
ANS: B PTS: 1 REF: HTML 404
21. Which input type displays a browse button to locate and select a file?
a. type= “attach” c. type= “file”
b. type= “find” d. type= “browse”
ANS: C PTS: 1 REF: HTML 405
22. Which input type creates a field that is not viewable on the form?
a. type= “conceal” c. type= “view”
b. type= “off” d. type= “hidden”
ANS: D PTS: 1 REF: HTML 405
23. Which input type displays an inline image that can be clicked to perform an action from a script?
a. type= “image” c. type= “picture”
b. type= “inline” d. type= “action”
ANS: A PTS: 1 REF: HTML 405
24. Which input type displays an input box that hides text entered by the user?
a. type= “hidden” c. type= “user”
b. type= “password” d. type= “hide”
ANS: B PTS: 1 REF: HTML 405
25. When a form is submitted, the server receives the data in ____ pairs.
a. name/value c. id/value
b. label/name d. value/label
ANS: A PTS: 1 REF: HTML 404
26. To create an input box for ____ entry, add the element <input type=”type” name=”name” id=”id” /> to
the web form, where type specifies the type of input control, rhe name attribute provides the name of
the field associated with the control element, and the id attribute identifies the control element itself.
a. numeric c. text
b. label d. character
ANS: C PTS: 1 REF: HTML 405
27. When you link a label with an associated text element for scripting purposes, you must bind the label
to the ____ attribute of the field.
a. id c. label
b. name d. what
ANS: A PTS: 1 REF: HTML 408
28. To associate a label with the control element with the id of "city", you would enter ____.
a. <label id="city"> c. <label element="city">
b. <label for="city"> d. <label associate="city">
ANS: B PTS: 1 REF: HTML 408
30. The ____ style can be used to change label elements into block elements.
a. type:block c. display: block
b. format: block d. block: block
ANS: C PTS: 1 REF: HTML 413 | HTML414
31. The placeholder automatically disappears as soon as a user selects the ____ box.
a. label c. text
b. input d. textarea
ANS: B PTS: 1 REF: HTML 416
32. To set the number of options displayed at one time in the selection list, add the attribute_______,
a. selected = “selected” c. multiple=”multiple”
b. size=”value” d. select = “select”
ANS: B PTS: 1 REF: HTML 423
34. Another way you can specify the width is to use the ____ attribute.
a. size c. length
b. maximum d. characters
ANS: A PTS: 1 REF: HTML 415
35. To avoid confusion, set the width either with _____ width style or the HTML size attribute, but not
both.
a. CIS c. CGI
b. CSS d. PHP
ANS: C PTS: 1 REF: HTML 415
36. Many browsers include a(n) ________ feature that automatically fills in input form values if they are
based on previously filled out forms.
a. autocorrect c. grammar check
b. autocomplete d. spelling
ANS: B PTS: 1 REF: HTML 411
37. To define a default value for a field, use the following syntax: ____.
a. <input field= “value” /> c. <input default= “value” />
b. <input main= “value” /> d. <input value= “value” />
ANS: D PTS: 1 REF: HTML 415
39. You can specify an access key for an input element by using the ____ attribute.
a. shortcut c. accesskey
b. key d. keypress
ANS: C PTS: 1 REF: HTML 408
40. The ________ automatically disappears as soon as a user selects the input box.
a. input box c. textarea
b. text box d. placeholder
ANS: D PTS: 1 REF: HTML 416
41. ____ buttons can be placed into a group so that selecting one deselects all of the others.
a. Checkbox c. Command
b. Image d. Radio
ANS: D PTS: 1 REF: HTML 429
42. To group option buttons so that selecting one deselects all of the others, you must make the ____
attribute the same.
a. name c. id
b. type d. value
ANS: A PTS: 1 REF: HTML 430
43. To identify the specific options for option buttons, you use the ____ attribute.
a. name c. id
b. type d. value
ANS: C PTS: 1 REF: HTML 433
44. To specify that an option button be already selected, you type ____.
a. checked="yes" c. checked="checked"
b. value="checked" d. value="yes"
ANS: C PTS: 1 REF: HTML 434
45. A ____ should be used to provide visual indication that option buttons belong in the same group.
a. fieldset c. table
b. label d. value
ANS: A PTS: 1 REF: HTML 430
46. In the general syntax for the <select> and <option> tags, each ____ tag represents an individual item in
the selection list.
a. <option> c. <index>
b. <item> d. <each>
ANS: A PTS: 1 REF: HTML 425
47. By default, the ____ tag displays one option from the selection list, along with a list arrow to view
additional selection options.
a. <index> c. <option>
b. <select> d. <checked>
ANS: B PTS: 1 REF: HTML 423
48. HTML allows you to organize selection lists into distinct groups called ____ groups.
a. option c. unique
b. selection d. category
ANS: A PTS: 1 REF: HTML 428
49. You can change the number of options displayed in a selection list by modifying the ____ attribute.
a. display c. size
b. list d. number
ANS: C PTS: 1 REF: HTML 426
50. When using the password data type, any information that a user enters will be displayed as a series of
____ or asterisks, protecting the information from prying eyes.
a. dashes
b. dots
c. ampersands
d. plus signs
ANS: B PTS: 1 REF: HTML 429
51. For noncontiguous selections from a selection list on a PC, press and hold the ____ key while you
make your selections.
a. Ctrl c. Esc
b. Shift d. Alt
ANS: A PTS: 1 REF: HTML 427
52. For a contiguous selection in a selection list, select the first item, press and hold the ____ key, and then
select the last item in the range.
a. Ctrl c. Esc
b. Shift d. Alt
ANS: B PTS: 1 REF: HTML 427
53. ____ are used to check for the presence or absence of something.
a. Check boxes c. Group boxes
b. Option boxes d. Text boxes
ANS: A PTS: 1 REF: HTML 437
56. In a text area, the default value of the wrap attribute is ____.
a. on c. soft
b. off d. hard
ANS: C PTS: 1 REF: HTML 435
57. In a ____ wrap, information about where the text begins a new line is included with the data field
value.
a. soft c. off
b. hard d. on
ANS: B PTS: 1 REF: HTML 435
58. When a user tabs through the form, the tab order will reflect the order of the items in the ____ file.
a. HTML c. CSS
b. CGI d. PHP
ANS: A PTS: 1 REF: HTML 437
59. Typically, users navigate through a Web form using the _____ key, which moves the cursor
from one field to another in the order that the field tags are entered into the HTML file.
a. ALT c. SHIFT
b. TAB d. CTRL
ANS: B PTS: 1 REF: HTML 437
60. For most browsers, if no value for the wrap attribute of a text area is specified, a value of ____ is used.
a. hard c. soft
b. off d. on
ANS: C PTS: 1 REF: HTML 435
61. To create an action for a(n) ____ button, you have to write a script or program that runs automatically
when the button is clicked.
a. option c. group
b. radio d. command
ANS: D PTS: 1 REF: HTML 456
62. To create a button that will allow a user to send the form data to the server, you use a type of ____.
a. command c. option
b. reset d. submit
ANS: D PTS: 1 REF: HTML457
63. To create a button that will clear the form fields, you use a type of ____.
a. command c. option
b. reset d. submit
ANS: B PTS: 1 REF: HTML 457
65. Validation can occur after the data is sent to the server with _________.
a. client-side validation c. HTML validation
b. server-side validation d. HTML5 validation
ANS: B PTS: 1 REF: HTML 460
67. The ____ method of the <form> tag packages form data by appending it to the end of the URL
specified in the action attribute.
a. post c. put
b. get d. keep
ANS: B PTS: 1 REF: HTML 400
68. The technique of immediate data validation and reporting of errors is known as _________.
a. online validation c. inline validation
b. regular expression d. immediate validation
ANS: C PTS: 1 REF: HTML 466
69. ______ refers to the state in which an element has been clicked by the user, making it the active
control element on the form.
a. Cursor c. Focus
b. Insertion point d. Directive
ANS: C PTS: 1 REF: HTML 467
70. The pseudo-class _____ matches check boxes or option buttons whose toggle states (checked or
unchecked) cannot be determined.
a. indeterminate c. invalid
b. checked d. required
ANS: A PTS: 1 REF: HTML 467
Case-Base Critical Thinking Questions
Case 6-1
Oscar owns Oscar's Skateboard Shop. He wants to create a Web form to allow users to specify the type
of skateboards they would like to buy. This includes the make, model, type and color, and board
options. Oscar's skateboards come in Children, Young Adult, and Adult sizes. Oscar's skateboards
only come in color, pattern, and themes. He has over 25 makes and models of skateboards.
71. Since make and model are normally lists, Oscar should use a ____ tag to specify the lists.
a. <checkbox> c. <select>
b. <file> d. <command>
ANS: C PTS: 1 REF: HTML 422 TOP: Critical Thinking
72. Oscar should use ____ to allow users to select the skateboard type.
a. radio buttons c. command buttons
b. check boxes d. group boxes
ANS: B PTS: 1 REF: HTML 437 TOP: Critical Thinking
73. For the color, Oscar should most likely use ___.
a. radio buttons c. command buttons
b. check boxes d. group boxes
ANS: A PTS: 1 REF: HTML 429 TOP: Critical Thinking
Case 6-2
Wyona, owner of Wyona’s Hat Designs, desires to have a Web site built for customers to order
custom-made hats. They can pick from straw, leather, and material hat collections. Customers can
specify one of their existing patterns, which include about 50 designs. They can also choose a custom
pattern instead and then provide information about the pattern they want for Wyona to custom create.
74. In order to provide customers plenty of room to enter the information for a custom pattern, which type
of field should Wyona provide for the user?
a. textarea c. text
b. radio d. select
ANS: A PTS: 1 REF: HTML 434 TOP: Critical Thinking
75. Wyona wants to separate the different options for straw, leather and material. Which element can she
use to create these groups?
a. check box c. radio
b. select d. fieldset
ANS: D PTS: 1 REF: HTML 430 TOP: Critical Thinking
76. Wyona wants to label each group. Which element would be the best for her to use?
a. label c. legend
b. caption d. text
ANS: C PTS: 1 REF: HTML 403 TOP: Critical Thinking
77. For her address she wants to make sure the zipcode is set to 5 characters only. Which attribute of a text
box will allow her to do this?
a. maxlength c. length
b. size d. characters
ANS: A PTS: 1 REF: HTML 466 TOP: Critical Thinking
Case 6-3
Larry has just bought an online Web hosting solution from a popular ISP. He knows the ISP provides
some scripts to allow people to create logon pages for their Web site if they want to have a
password-protected blog, for example. Larry wants to create such a page for his blog about video
games.
78. Before Larry builds his form, which of the following should he consult concerning required fields?
a. his ISP c. his desired form design
b. his other Web pages d. none of the above
ANS: A PTS: 1 REF: HTML 399 TOP: Critical Thinking
79. Which element will Larry most likely use to create the password element?
a. select c. textarea
b. input d. option
ANS: B PTS: 1 REF: HTML 405 TOP: Critical Thinking
80. What type of method will Larry most likely be using for submitting his form data?
a. get c. post
b. submit d. reset
ANS: C PTS: 1 REF: HTML 391 TOP: Critical Thinking
COMPLETION
ANS: value
3. A(n) ____________________ is a box placed around a set of fields that indicates that they belong to a
common group.
ANS:
fieldset
field set
PTS: 1 REF: HTML 402
ANS: radio
5. The input type=“____________________” displays a button that submits the form when clicked.
ANS: submit
6. A(n) ____________________ field is an input box in which the characters typed by the user are
displayed as bullets or asterisks.
ANS: password
7. If most people enter the same value into a field, it may make sense to define a(n)
____________________ value for a field.
ANS: default
8. ____________________ buttons are similar to selection lists in that they display a list of choices from
which a user makes a selection.
ANS:
Option
Radio
9. Selection lists are used for long lists of options, usually appearing in a(n) ____________________ list
box.
ANS:
drop-down
drop down
10. Adding the ____________________ attribute to the <select> tag allows multiple selections from a list.
ANS: multiple
12. Web page designers can use tab ____________________ numbers in their forms without worrying
about older browsers that do not support this new standard.
ANS: index
13. Form ____________________ are control elements that can be clicked to start processing a form.
ANS: buttons
14. A(n) ____________________ button is created using the <input> tag as follows: <input type=“button”
value=“text” />.
ANS: command
15. A(n) ____________________ button is a button that submits the form to the CGI script for processing.
ANS: submit
16. A(n) ____________________ button resets the form to its original values.
ANS: reset
17. Whenever possible, you should supplement your server-side validation with ______ validation to
reduce the workload on the server.
ANS: client-side
18. A(n) ____________________ field is added to the form but not displayed in the Web page.
ANS: hidden
19. The _________ attribute can be used only with input boxes that store text.
ANS: pattern
ANS: in-range
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a. input boxes g. form buttons
b. selection lists h. fields
c. option buttons i. get
d. check boxes j. enctype
e. field sets k. option groups
f. text areas l. hidden
1. Used to specify an item as either present or absent
2. Basic element storing each piece of form information
3. Used to select a single option from a predefined list
4. Can be clicked to start processing the form
5. Used for long lists of options
6. Used for extended entries that can include several lines of text
7. Used to organize form elements
8. Can be used to create an email field that is part of your form but not displayed
9. Can be used to group items on a drop-down list
10. Used to append form data to a URL
11. Used to indicate what type of data a form is submitting
12. Used for text and numerical entries
ESSAY
ANS:
<select attributes>
<optgroup label= “label1”>
<option>item1a</option>
<option>item2a</option>
...
</optgroup>
<optgroup label= “label2”>
<option>item1b</option>
<option>item2b</option>
...
</optgroup>
...
</select>
2. Explain how each of the three wrap attribute values of text areas work.
ANS:
With the wrap= “off” value, all the text is displayed on a single line, scrolling to the left if the text
extends past the width of the box. Text goes to the next row in the box only if the Enter key is pressed.
The text is sent to the CGI script in a single line. With the wrap= “soft” value, text wraps automatically
to the next row when it extends beyond the width of the text box. The text is still sent to the CGI script
in a single line without any information about how the text was wrapped within the text box. With the
wrap= “hard” value, text wraps automatically to the next row when it extends beyond the width of the
text box. When the text is sent to the CGI script, the line-wrapping information is included, allowing
the CGI script to work with the text exactly as it appears in the text box.
3. Describe submit and reset buttons and show the syntax for the two buttons.
ANS:
The two other kinds of form buttons are submit and reset buttons. A submit button
submits a form to the server for processing when clicked. Clicking a reset button resets
the form, changing all field values to their original default values and deleting any values
that a user might have entered into the form. The syntax for creating these two buttons is
<input type=? ”submit? ” value=? ”text? ” />
<input type=? ”reset? ” value=? ”text? ” />
where once again the value attribute defines the text that appears on the button.