Download as pdf or txt
Download as pdf or txt
You are on page 1of 37

HTML5 and CSS Complete 7th Edition

Woods Test Bank


Go to download the full and correct content document:
https://testbankfan.com/product/html5-and-css-complete-7th-edition-woods-test-bank/
More products digital (pdf, epub, mobi) instant
download maybe you interests ...

HTML5 and CSS Complete 7th Edition Woods Solutions


Manual

https://testbankfan.com/product/html5-and-css-complete-7th-
edition-woods-solutions-manual/

HTML5 and CSS Comprehensive 7th Edition Woods Test Bank

https://testbankfan.com/product/html5-and-css-comprehensive-7th-
edition-woods-test-bank/

HTML5 and CSS3 Illustrated Complete 2nd Edition Vodnik


Test Bank

https://testbankfan.com/product/html5-and-css3-illustrated-
complete-2nd-edition-vodnik-test-bank/

HTML5 and CSS3 Illustrated Complete 2nd Edition Vodnik


Solutions Manual

https://testbankfan.com/product/html5-and-css3-illustrated-
complete-2nd-edition-vodnik-solutions-manual/
New Perspectives HTML5 and CSS3 Comprehensive 7th
Edition Carey Test Bank

https://testbankfan.com/product/new-perspectives-html5-and-
css3-comprehensive-7th-edition-carey-test-bank/

Web Development and Design Foundations with HTML5 7th


Edition Morris Test Bank

https://testbankfan.com/product/web-development-and-design-
foundations-with-html5-7th-edition-morris-test-bank/

New Perspectives HTML5 and CSS3 Comprehensive 7th


Edition Carey Solutions Manual

https://testbankfan.com/product/new-perspectives-html5-and-
css3-comprehensive-7th-edition-carey-solutions-manual/

Web Development and Design Foundations with HTML5 7th


Edition Morris Solutions Manual

https://testbankfan.com/product/web-development-and-design-
foundations-with-html5-7th-edition-morris-solutions-manual/

New Perspectives on HTML and CSS Comprehensive 6th


Edition Carey Test Bank

https://testbankfan.com/product/new-perspectives-on-html-and-css-
comprehensive-6th-edition-carey-test-bank/
Chapter 6 – Creating a Form on a Web Page

MULTIPLE CHOICE

1. A(n) ____ control is any type of input mechanism on a form.


a. variable c. parameter
b. input d. form
ANS: B PTS: 1 REF: HTML 287

2. Which of the following controls sends a form to a server for processing?


a. enter c. send
b. reset d. submit
ANS: D PTS: 1 REF: HTML 287

3. Which of the following controls returns all input controls to the default status?
a. clear c. reset
b. empty d. new
ANS: C PTS: 1 REF: HTML 287

4. Which of the following controls is identical to text fields used for single-line data entry?
a. submit c. password
b. textarea d. radio
ANS: C PTS: 1 REF: HTML 287

5. Which of the following controls creates a drop-down menu of choices from which a visitor chooses?
a. select c. menu
b. option d. choice
ANS: A PTS: 1 REF: HTML 287

6. Which of the following attributes, when used with the text tag, determines the number of characters
that display on a form?
a. character c. width
b. size d. dimension
ANS: B PTS: 1 REF: HTML 287

7. The ____ attribute of the text tag specifies the maximum length of the input field.
a. size c. maxlength
b. limit d. control
ANS: C PTS: 1 REF: HTML 287

8. A ____ input control is either a radio button, a check box, a Submit button, a Reset button, or a
selection menu.
a. select c. capture
b. data d. list
ANS: B PTS: 1 REF: HTML 287

9. In a ____ box, a visitor may enter small amounts of text.


a. capture c. text
b. link d. textarea
ANS: C PTS: 1 REF: HTML 287

10. The text control has two attributes: ____.


a. cols and rows c. size and maxlength
b. post and get d. width and height
ANS: C PTS: 1 REF: HTML 287

11. In a radio control each choice is preceded by a radio ____.


a. menu c. button
b. bar d. either b or c
ANS: C PTS: 1 REF: HTML 288

12. A radio button typically displays as which of the following?


a. bullet c. small rectangle
b. open circle d. none of the above
ANS: B PTS: 1 REF: HTML 288

13. A ____ control creates a list item in a list from which only one item can be chosen.
a. select c. list
b. solo d. radio
ANS: D PTS: 1 REF: HTML 288

14. The type="____" attribute specifies that the type of control is the radio button.
a. radio c. option
b. check d. circle
ANS: A PTS: 1 REF: HTML 288

15. With a checkbox control, the default can be changed so a particular check box is preselected as the
default, by using the ____ attribute and value within the <input> tag.
a. chosen c. checked
b. default d. preselect
ANS: C PTS: 1 REF: HTML 288

16. The use of which of the following controls prevents the visitor’s having to type information into a text
field?
a. text c. password
b. textarea d. select
ANS: D PTS: 1 REF: HTML 289

17. A(n) ____ control creates a selection menu of choices from which a visitor selects one or more
choices.
a. select c. radio
b. option d. checkbox
ANS: A PTS: 1 REF: HTML 289

18. ____ controls are similar to text controls, except that they allow multiple lines of text input.
a. Password c. Capture
b. Textarea d. Either a or b
ANS: B PTS: 1 REF: HTML 289

19. The textarea control has two primary attributes: ____.


a. rows and cols c. size and width
b. size and maxlength d. select and option
ANS: A PTS: 1 REF: HTML 289

20. It is a good rule of thumb to keep the number of columns in a textarea to ____ or fewer.
a. 10 c. 25
b. 15 d. 50
ANS: D PTS: 1 REF: HTML 289

21. The ____ attribute identifies the specific information that is being sent when the form is submitted for
processing.
a. spec c. target
b. name d. this
ANS: B PTS: 1 REF: HTML 290

22. All controls except one have a ____ attribute.


a. name c. value
b. link d. select
ANS: C PTS: 1 REF: HTML 290

23. The <____> tag defines the text that displays in the grouping borders.
a. key c. cluster
b. legend d. aggregate
ANS: B PTS: 1 REF: HTML 291

24. The ____ attribute of the <form> tag indicates the URL for the action to be completed by the server.
a. method c. action
b. process d. http
ANS: C PTS: 1 REF: HTML 291

25. There are two primary methods to send the form to the server to be processed: ____
a. send and put c. get and put
b. get and post d. CGI and HTML
ANS: B PTS: 1 REF: HTML 294

26. Which of the following is a program written in a programming language (such as Perl) that
communicates with the Web server?
a. HTML function c. URL imagemap
b. CGI script d. post method
ANS: B PTS: 1 REF: HTML 294

27. The ____ attribute of the <form> tag specifies the manner in which the data entered in the form is sent
to the server to be processed.
a. process c. http
b. server d. method
ANS: D PTS: 1 REF: HTML 294

28. The two values of the ____ attribute in HTML are get and post.
a. process c. http
b. server d. method
ANS: D PTS: 1 REF: HTML 294

29. The ____ method sends the name-value pairs to the end of the URL indicated in the action attribute.
a. get c. post
b. base d. serv
ANS: A PTS: 1 REF: HTML 294

30. The size=“2” attribute means which of the following?


a. two characters will appear, but more may be entered, depending on the maxlength attribute
b. one character will appear, and the second will be truncated
c. two characters will appear, and no more may be entered
d. at most, two characters can be entered
ANS: A PTS: 1 REF: HTML 296

31. The default type for the <input /> tag is a ____.
a. radio button c. text box
b. checkbox d. textarea
ANS: C PTS: 1 REF: HTML 297

32. If no ____ attribute value is specified, a selection menu initially displays only one option, along with a
list arrow to view other choices in the list.
a. default c. size
b. choice d. checked
ANS: C PTS: 1 REF: HTML 300

33. If a selection menu includes the size attribute with a value of 3, ____ choice(s) will appear in the
menu.
a. one c. three
b. two d. four
ANS: C PTS: 1 REF: HTML 301

34. If the ____ attribute was not used to create a selection menu, the Web page visitor will be allowed to
select only one choice in the menu.
a. several c. choices
b. many d. multiple
ANS: D PTS: 1 REF: HTML 302

35. Form controls are useless unless the information entered in the form can be submitted for ____.
a. concatenation c. aggregation
b. processing d. all of the above
ANS: B PTS: 1 REF: HTML 304
36. Which of the following tags gives you the option of using an image for a Submit button, rather than
using the default button style?
a. <option> c. <modify>
b. <image button> d. <button>
ANS: D PTS: 1 REF: HTML 304

37. The <form method=post action=mailto:ahs@isp.com> tag designates that the ____ method will be
used to send data to the appropriate location for processing.
a. mailto c. post
b. form d. action
ANS: C PTS: 1 REF: HTML 304

38. Which of the following characters strings together all of the form responses?
a. & c. @
b. ! d. %
ANS: A PTS: 1 REF: HTML 305

39. Which of the following buttons deletes any data previously typed into text or textarea fields?
a. New c. Clear
b. Restore d. Reset
ANS: D PTS: 1 REF: HTML 305

40. Which of the following attributes specifies a reset button?


a. type=“option” c. reset=“type”
b. master=“reset” d. type=“reset”
ANS: D PTS: 1 REF: HTML 305

MULTIPLE RESPONSE

Modified Multiple Choice

1. Which of the following is a main component of a Web page form?


a. input controls c. link to a major search engine
b. <form> tag d. Submit button
ANS: A, B, D PTS: 1 REF: HTML 287

2. A text input control is a ____ box.


a. link c. password text
b. textarea d. text
ANS: B, C, D PTS: 1 REF: HTML 287

3. Which of the following controls creates a list item?


a. checkbox c. list
b. radio d. dropdown
ANS: A, B PTS: 1 REF: HTML 287

4. A password always appears as a series of which of the following?


a. characters c. bullets
b. asterisks d. ampersands
ANS: A, B, C PTS: 1 REF: HTML 288

5. When a Web page visitor clicks the Submit button on the form, which of the following is sent to be
processed?
a. parameters of the control
b. value of the data contained with the control
c. dimensions of the field
d. name of the control
ANS: B, D PTS: 1 REF: HTML 290

MODIFIED TRUE/FALSE

1. A text control creates a text box that is used for a single line of input. _________________________

ANS: T PTS: 1 REF: HTML 287

2. By default, all check boxes are pre-selected. _________________________

ANS: F, deselected

PTS: 1 REF: HTML 288

3. The reset input control sends the information from a form to the appropriate location for processing.
_________________________

ANS: F, submit

PTS: 1 REF: HTML 290

4. A Web page form must include a Reset button. _________________________

ANS: F, Submit

PTS: 1 REF: HTML 290

5. The paragraph input control creates a multiple-line field for a relatively large amount of text.
_________________________

ANS: F, textarea

PTS: 1 REF: HTML 291

TRUE/FALSE

1. Using a Web page form for user input reduces the potential for errors because customers enter data or
select options from the form included directly on the Web page.

ANS: T PTS: 1 REF: HTML 284


2. A select input control creates a series of check boxes for Web visitors to use.

ANS: F PTS: 1 REF: HTML 288

3. The maximum length of a text field may exceed the size of the field that displays on the form.

ANS: T PTS: 1 REF: HTML 288

4. Each choice in a check box list can be either on or off.

ANS: T PTS: 1 REF: HTML 288

5. A checkbox control allows a Web page visitor to select only one choice from a list of choices.

ANS: F PTS: 1 REF: HTML 288

6. Multiple radio buttons in the same group can be set to a checked state at the same time.

ANS: F PTS: 1 REF: HTML 288

7. With check boxes, only one option can be selected at a time.

ANS: F PTS: 1 REF: HTML 288

8. It is a good rule of thumb to use between 50 and 100 columns of text in a textarea field.

ANS: F PTS: 1 REF: HTML 289

9. The resume and send controls create the Reset and Submit buttons.

ANS: F PTS: 1 REF: HTML 290

10. A Web page form must include a Reset button.

ANS: F PTS: 1 REF: HTML 290

11. For a textarea field, no value attribute is possible because of the variability of the input.

ANS: T PTS: 1 REF: HTML 290

12. All options in a selection menu are contained within the <select> and </select> tags.

ANS: T PTS: 1 REF: HTML 292

13. HTML5 includes new attributes for the <input /> tag.

ANS: T PTS: 1 REF: HTML 291

14. The value attribute of the <input /> tag is optional for radio and checkbox controls.

ANS: F PTS: 1 REF: HTML 291

15. Few Web sites use CGI scripts to process forms because this is an inefficient way to handle the data
that is sent to a form.
ANS: F PTS: 1 REF: HTML 293

16. The get method sends the name-value pairs to the end of the URL indicated in the action attribute.

ANS: T PTS: 1 REF: HTML 294

17. The post method is a program written in a programming language that communicates with the Web
server.

ANS: F PTS: 1 REF: HTML 294

18. Information on forms can be sent by e-mail to an e-mail address or can be used to update a database.

ANS: T PTS: 1 REF: HTML 294

19. A FORM script sends the information input on a Web page form to the Web server for processing.

ANS: F PTS: 1 REF: HTML 294

20. If you specify a maximum number of characters that is greater than the number of characters specified
in the size attribute, the additional characters will be cut off.

ANS: F PTS: 1 REF: HTML 296

21. If you do not specify a size attribute in the <select> tag, only one option is displayed, along with a list
arrow.

ANS: T PTS: 1 REF: HTML 300

22. The <legend> tag within the fieldset tag is required.

ANS: F PTS: 1 REF: HTML 306

23. An embedded style sheet changes the style for a single Web page.

ANS: T PTS: 1 REF: HTML 308

24. You should validate the code after the form is completed and view and test it using your browser.

ANS: T PTS: 1 REF: HTML 311

25. When you are collecting information from an online form, it is very important to test that the
information is accurate.

ANS: T PTS: 1 REF: HTML 311

COMPLETION

1. A(n) ____________________ input control is either a text box, a textarea box, or a password text box.

ANS: text
PTS: 1 REF: HTML 287

2. In a(n) ____________________ text box, a visitor may enter a password.

ANS: password

PTS: 1 REF: HTML 287

3. In a(n) ____________________ box, a visitor may enter larger amounts of text.

ANS: textarea

PTS: 1 REF: HTML 287

4. The ____________________ attribute of the text control determines the number of characters that
display on the form.

ANS: size

PTS: 1 REF: HTML 287

5. A(n) ____________________ control tells the browser to send the data on the form to the server.

ANS: submit

PTS: 1 REF: HTML 287

6. A(n) ____________________ control returns all input controls to the default status.

ANS: reset

PTS: 1 REF: HTML 287

7. A(n) ____________________ control creates a list item in a list from which more than one item can
be chosen.

ANS: checkbox

PTS: 1 REF: HTML 288

8. To set a particular radio button as the default, you use the ____________________ value within the
<input /> tag.

ANS: checked

PTS: 1 REF: HTML 288

9. A(n) ____________________ button typically appears as an open circle.

ANS:

radio
option
PTS: 1 REF: HTML 288

10. The textarea control uses the ____________________ attribute to specify the number of columns in
the textarea field.

ANS: cols

PTS: 1 REF: HTML 289

11. The ____________________ button sends the information to the appropriate location for processing.

ANS: Submit

PTS: 1 REF: HTML 290

12. The <____________________/ > tag defines the controls used in the form, using a variety of type
attribute values.

ANS: input

PTS: 1 REF: HTML 291

13. The <____________________> tag creates a form that allows user input.

ANS: form

PTS: 1 REF: HTML 291

14. The ____________________ method sends a separate data file with the name-value pairs to the URL
(or e-mail address) indicated in the action attribute.

ANS: post

PTS: 1 REF: HTML 294

15. When the ____________________ attribute specifies the same number of characters as the size
attribute, all characters entered by a user will appear in the text box.

ANS: maxlength

PTS: 1 REF: HTML 296

16. To select multiple choices in a selection menu, a user must first select one choice and then press and
hold the ____________________ key while clicking other choices in the list.

ANS: CTRL

PTS: 1 REF: HTML 301

17. To select several consecutive choices in a selection menu, a user must first select one choice and then
press and hold the ____________________ key while selecting the last choice.

ANS: SHIFT
PTS: 1 REF: HTML 301

18. The ____________________ button clears any input that was entered in the form, restoring the input
controls back to the initial values.

ANS: Reset

PTS: 1 REF: HTML 304

19. The ____________________ control helps to group related form elements together.

ANS: fieldset

PTS: 1 REF: HTML 306

20. Using ____________________ is especially helpful in cases where some information is required and
some is optional.

ANS: grouping

PTS: 1 REF: HTML 306

MATCHING

Identify the letter of the choice that best matches the phrase or definition.
a. data input f. select
b. checkbox g. textarea
c. attributes h. password
d. radio button i. select control
e. input j. target
1. The use of asterisks, for example, to mark the entered text in this kind of field is designed to help
protect text from being observed as it is being entered
2. When one of these is selected, all of the other ones in the list are deselected automatically
3. This category of control eliminates a visitor's having to type information into a text or textarea field
4. This kind of field is useful when an extensive amount of input from the Web page visitors is required
or desired
5. This kind of input control creates a list item
6. If a choice in a selection menu is highlighted, it means that this attribute has been used for that choice
7. This kind of control either can be a radio button, a check box, a Submit button, or a Reset button
8. These kinds of controls either are HTML tags or attributes of HTML tags
9. Nearly all of the HTML tags used to create forms have at most one of these each
10. This attribute of the <form> tag indicates the location at which a resource will display

1. ANS: H PTS: 1 REF: HTML 288


2. ANS: D PTS: 1 REF: HTML 288
3. ANS: F PTS: 1 REF: HTML 289
4. ANS: G PTS: 1 REF: HTML 289
5. ANS: B PTS: 1 REF: HTML 288
6. ANS: I PTS: 1 REF: HTML 289
7. ANS: A PTS: 1 REF: HTML 287
8. ANS: E PTS: 1 REF: HTML 291
9. ANS: C PTS: 1 REF: HTML 291
10. ANS: J PTS: 1 REF: HTML 291

ESSAY

1. Briefly list the HTML tags used to create forms, including their functions and any relevant remarks
about their use.

ANS:
<fieldset></fieldset> -- groups related controls on a form; it is optionally used for readability
<form></form> -- creates a form that allows user input; it is required when creating forms
<input /> -- defines the controls used in the form, using a variety of type attribute values; it is required
for input controls
<legend></legend> -- defines the caption that is displayed in the grouping borders; it is optionally
used when using <fieldset> tags
<option></option> -- specifies a choice in a <select> tag; it is required, one per choice
<select></select> -- creates a menu of choices from which a visitor selects; it is required for selection
choices
<textarea></textarea> -- creates a multiple-line text input area; it is required for longer text inputs that
appear on several lines

PTS: 1 REF: HTML 291 TOP: Critical Thinking

2. Explain in detail the difference between the action and method attributes of the <form> tag. Be sure to
include a definition of CGI script, and the get and post method in your explanation.

ANS:
The action attribute of the <form> tag specifies the action that is taken when the form is submitted.
Information entered in forms can be sent by e-mail to an e-mail address or can be used to update a
database. Although the e-mail option is functional, many Web sites process information from forms
using Common Gateway Interface (CGI) scripting. A CGI script is a program written in a
programming language (such as PHP or Perl) that communicates with the Web server. The CGI script
sends the information input on the Web page form to the server for processing.

The method attribute of the <form> tag specifies the manner in which the data entered in the form is
sent to the server to be processed. Two primary ways are used in HTML: the get method and the post
method. The get method sends the name-value pairs to the end of the URL indicated in the action
attribute. The post method sends a separate data file with the name-value pairs to the URL (or e-mail
address) indicated in the action attribute. Most Web developers prefer the post method because it is
much more flexible. You need to be cautious when using the get method. Some Web servers limit a
URL’s size, so you run the risk of truncating relevant information when using the get method.

PTS: 1 REF: HTML 293-HTML 294 TOP: Critical Thinking

3. Describe in detail the four steps involved in creating an effective form.

ANS:
Before creating a Web page form, you should plan how you want to format it. By effectively utilizing
input controls, you can call attention to important data-collection areas on the Web page without
overpowering it. Creating an effective form includes:
1. Determine what data to collect. In the case of a form designed to collect information, you need the
visitor’s name and e-mail address. Make sure to provide enough space for each field so that you do not
cut out important information. For instance, a last name field only 5 characters long may cut out much
of the person’s last name.
2. Determine what types of control to use. For data such as name and e-mail address, you need text
input areas. For data such as favorite Internet radio station, there is generally a limited subset (e.g.,
Google, Live 365, Pandora, and Slacker), so a selection control is appropriate. When you ask what
kind of music the visitor is interested in listening to or buying, you can use check boxes, which allow
multiple selection. In the case of a question with only one appropriate answer (e.g., select your
favorite), a radio button is more appropriate.
3. Lay out the input areas effectively. One of the first input items you may want is the visitor’s name
and e-mail address information. That should go to the top of the page. Also, you can group information
together on the same line if it makes sense to make the Web page form short enough that visitors do
not have to scroll much. Collecting e-mail addresses is a great way to continue communication with
visitors or customers. A company can e-mail newsletters, coupons, and general information to
customers once they have their e-mail addresses.
4. Use grouping techniques for clarity. The last thing that you may want to do on a Web page form is
group like input items together. Use the fieldset tag to segregate personal information from preference
information and from other comments that the visitor might make.

PTS: 1 REF: HTML 295-HTML 296 TOP: Critical Thinking

CASE

Critical Thinking Questions


Case 6-1

Brendan is trying to familiarize himself in a hurry with the various form input controls. He has a sense
of the general function of each but not of the nuances among them.

1. What does Brendan learn is the key difference between the checkbox and radio controls?
a. The checkbox control indicates both the size of the field and the total maximum length,
and radio control indicates neither.
b. The checkbox control allows more than one item in a list to be chosen, and the radio
control indicates only one item in a list that can be chosen.
c. The radio control allows more than one item in a list to be chosen, and the checkbox
control indicates only one item in a list that can be chosen.
d. The radio control returns all input controls to the default status, and the radio button tells
the browser to send the data on the form to the server.

ANS:
B

PTS: 1 REF: HTML 288 TOP: Critical Thinking

2. Brendan has a list of 30 different options for a user to select from a given list. Which of the following
controls is the best match for his need?
a. select
b. checkbox
c. radio
d. any of the above

ANS:
A

PTS: 1 REF: HTML 289 TOP: Critical Thinking

Critical Thinking Questions


Case 6-2

Jacqueline is inheriting a segment of code from a developer who has left the firm. The problem is that
the code became corrupted on a portion of the server during a recent crash and she has to reconstruct a
lot of it.

3. One portion of the code Jacqueline is reconstructing includes a reference to the name attribute, but the
HTML tag is missing. Which of the following tags CANNOT be the tag in question?
a. <input />
b. <select></select>
c. <option></option>
d. <textarea></textarea>

ANS:
C

PTS: 1 REF: HTML 291-HTML 292 TOP: Critical Thinking

4. Another portion of the code Jacqueline is reconstructing includes a reference to the readonly attribute.
Which HTML tag must be in use?
a. <textarea></textarea>
b. <option></option>
c. <select></select>
d. <legend></legend>

ANS:
A

PTS: 1 REF: HTML 292 TOP: Critical Thinking


Another random document with
no related content on Scribd:
back
back
back
back
back
back
back
back
back
back
back
back
back
back
back
back
back
back
back

You might also like