Lesson 6: Web Forms (Quiz)
If you are conducting search engine optimization (SEO), you should: 1. create a complex form in order to slow a bot reading the page. 2. always use a CAPTCHA because it usually increases the search engine score. 3. use form fields without labels. 4. create as simple a form as possible.
4
When you create a select list, how can you specify to pass a value different from the text that appears in the list? 1. Add the multiple="" attribute into any or all of the <option> tags. 2. Add the value="" attribute into any or all of the <option> tags. 3. Add the type="" attribute into any or all of the <option> tags. 4. Add the name="" attribute into any or all of the <option> tags.
2
The main difference between form creation in HTML5 versus form creation in HTML 4.01 is: Each correct answer represents a complete solution. Choose all that apply. 1. Advanced features are now available for better control of validation and input control. 2. Cascading Style Sheets (CSS) can be used for all form styles but are not yet supported by most browsers. 3. Forms no longer require a Common Gateway Interface (CGI) program to process the script. 4. Cascading Style Sheets (CSS) are used for all form styles.
1, 4
Consider the following HTML code: <input type="file" name="File"/> What does this code create on a Web form? 1. A text box so users can specify files they want to find on your site 2. A Browse button so users can select and upload files to your site 3. A Find File button so users can specify files they want to download from your site 4. A Send File button so users can select and upload files to your site
2
Which choice lists the elements that are necessary for client-server communication? 1. Web form, server-side script, client-side script and Web client with the UNIX operating system 2. Web browser, Web form, Web server, and a Server-Side Scripting Language or CGI Script 3. Web browser, Web form, server-side script and client-side script 4. Web browser, CGI script, Web form and Web client with the UNIX operating system
2
In a raw text string, which of the following is used to delimit name=value pairs? 1. Plus signs ( + ) 2. Quotation marks ( " " ) 3. Ampersands ( & ) 4. Pipe symbols ( | )
3
In a raw text string, which of the following is used to replace spaces entered by the user? 1. Plus signs ( + ) 2. Ampersands ( & ) 3. Underscores ( _ ) 4. Quotation marks ( " " )
1
FormMail is a CGI script that is designed to receive information from a Web form. FormMail is popular because it: 1. prevents spam from proliferating on the Internet. 2. is written in JavaScript. 3. is widely available for a nominal fee. 4. sends form information to you via email.
4
Which attribute is shared by all Web form field elements? 1. The action attribute 2. The method attribute 3. The type attribute 4. The name attribute
4
Consider the following HTML code: <select name="timeofday" multiple="multiple" size="4"> What does the size attribute control? 1. The number of items that will appear in the scrolling list box 2. The width in characters of the scrolling list box 3. The maximum number of items that can be offered in the scrolling list box 4. The maximum number of characters allowed for each item in the scrolling list box
1
The most common form field used in designing Web forms is the: 1. text box. 2. text area. 3. radio button. 4. check box.
1
What occurs when a user clicks the Submit button on a Web form? 1. The data from all fields in the form is sent to be processed by the action specified in the <form> tag. 2. A Choose File dialog box appears, which the user can use to navigate to and select a local file for uploading. 3. All form fields are cleared and set back to their default settings. 4. All form fields are cleared and the data is submitted.
1
When creating Web forms, you use the <input> tag to: 1. create text boxes, check boxes, radio buttons, and the Submit and Reset buttons. 2. create a form into which you can input various form fields. 3. create single-option and multiple-option lists from which the user can choose items. 4. create form fields into which the user can enter multiple lines of text.
1
When using the <input> tag, you designate the form field type by assigning the appropriate value to: 1. the type attribute. 2. the name attribute. 3. the select attribute. 4. the textarea attribute.
1
When you create a text box field, you should use the size attribute to: 1. specify the visual width of the text box in characters. 2. specify the visual width of the text box in pixels. 3. specify the minimum number of characters a user must enter into the text box. 4. specify the maximum number of characters a user can enter into the text box.
1
When you submit a Web form, the browser sends the information entered in this form to the Web server as: 1. a raw text string. 2. hexadecimal code. 3. a server-side script. 4. a client-side script.
1
Which Web form field allows users to choose from among two or more mutually exclusive options? 1. Radio button 2. Check box 3. Select list 4. Text box
1
Which Web form field allows users to choose from among two or more non-exclusive options? 1. Check box 2. Radio button 3. Select list 4. Text box
1
Which Web form field should you use to create a scrolling text field into which a user can enter multiple lines of text? 1. Text area 2. Multiple-option select list 3. Text box 4. Single-option select list
1
Which of the following occurs when you specify the wrap="soft" attribute and value for the <textarea> tag? 1. Text you enter will continue on one line beyond the scrolling text box border. 2. Text you enter will wrap to the next row as it approaches the scrolling text box border. 3. The amount of text you will be able to type in each row will be restricted to the width of the scrolling text box. 4. You will be able to enter only one row of text in the scrolling text box.
1
For what should you use the value attribute when creating a text box field? 1. To specify the maximum number of characters a user can enter into the text box 2. To place default text inside the text box 3. To specify the width of the text box in characters 4. To specify the minimum number of characters a user must enter into the text box
2
Radio buttons are reserved for two or more mutually exclusive options on a Web form. How do you ensure this exclusivity? 1. The radio buttons must share the same value attribute. 2. The radio buttons must share the same name attribute. 3. The radio buttons must share the same checked attribute. 4. The radio buttons must share the same type attribute.
2
What is the term for code embedded into an HTML page and downloaded by a user to help process Web form input? 1. Structured Query Language (SQL) 2. Client-side script 3. Server-side script 4. Common Gateway Interface (CGI)
2
Which choice correctly specifies the attribute and value needed in an <input> tag for a group of radio buttons to designate a preselected option? 1. The checked="select" attribute and value 2. The checked="checked" attribute and value 3. The checked="on" attribute and value 4. The checked="yes" attribute and value
2
Which of the following actions will redisplay Web form fields with their default values? 1. Submitting the form 2. Resetting the form 3. Emailing the form 4. Processing the form
2
Which of the following should you use to specify the width in characters of a scrolling text box? 1. The maxlength attribute 2. The cols attribute 3. The size attribute 4. The width attribute
2
By adding the checked="checked" attribute and value into the <input> tag for a group of check boxes, you can: 1. specify that each check box be treated as part of a single database field. 2. specify that each check box be treated as a separate database field. 3. preselect as many check boxes as you like. 4. preselect only one check box in the group of check boxes.
3
Consider the following HTML code: <form> <p>Which skills can you offer a potential employer?</p> <input type="checkbox" name="Skills" value="HTML"/> HTML coding <input type="checkbox" name="Skills" value="GUI"/> GUI authoring tools <input type="checkbox" name="Skills" value="Design"/> Fundamental Web design <input type="checkbox" name="Skills" value="PMgmt"/> Project management <input type="checkbox" name="Skills" value="EComm"/> E-commerce solutions </form> Which type of form field does this XHTML code create? 1. A list from which users can choose multiple responses 2. A group of round buttons from which users can choose one response 3. A group of square buttons from which users can choose multiple responses 4. A list from which users can choose one response
3
Consider the following HTML code: <p>Are you CIW certified?</p> <select name="Certified" size="4"> <option>Not yet</option> <option>CIW Web Foundations Associate</option> <option>CIW Web Design Professional</option> <option>CIW Web Development Professional</option> </select> Which type of form field does this HTML code create? 1. A group of radio buttons from which users can choose one response 2. A drop-down list from which users can choose multiple responses 3. A drop-down list from which users can choose one response 4. A group of check boxes from which users can choose multiple responses
3
If you want to specify default text for a text area box, where should you add the text that will appear as default text? 1. To the value="" attribute of the <textarea> tag 2. To the type="" attribute of the <textarea> tag 3. Between the <textarea> tags 4. To the name="" attribute of the <textarea> tag
3
Which of the following describes a CGI? 1. A dedicated piece of hardware and/or software that serves user requests for Webpages as well as receives user input. 2. An element on a Webpage used for collecting user input. 3. A script that is embedded in an HTML page, downloaded by the user, and executed on their local machine. 4. A program that allows a Web server to pass control to a software application in order to process user submitted data.
4
What occurs when the Web server receives raw text strings from the client? 1. A server-side script strips the values from the name=value pairs and creates a database containing the data input by the user. 2. A server-side script parses and formats the raw text strings into a computer-readable format. 3. A server-side script parses and formats the raw text strings into a human-readable format. 4. A server-side script replaces spaces with plus signs ( + ) and inserts ampersands ( & ) between name=value pairs in the raw text strings.
3
When creating a Web form, which of the following should you use to create a scrolling text field into which users can enter multiple lines of text? 1. The <input> tag 2. The <form> tag 3. The <textarea> tag 4. The <select> tag
3
Which <input> tag attribute organizes Web form information submitted by the user into the basic elements for a raw text string, which is then processed by the Web server? 1. The method attribute 2. The action attribute 3. The name attribute 4. The type attribute
3
Which are examples of modern server-side scripting processors that might be used to handle a Web form's input? 1. IIS, Tomcat, Apache 2. Common Gateway Interface (CGI) Scripts 3. PHP, ASP, Java 4. Linux/Unix, Mac, Windows
3
Which of the following actions will upload user data from a Web form to the receiving server? 1. Resetting the form 2. Storing the form 3. Submitting the form 4. Processing the form
3
Which of the following must occur before a server-side script can process Web form data? 1. The user must render the human-readable data into a CGI-compatible format. 2. The user must convert the data into raw text strings. 3. The user must enter the data into the Web form and submit it. 4. The user must remove extraneous information before submitting the Web form.
3
You are creating a select list for your Web form. You want to allow users to choose more than one response from your list. Which attribute and value should you add to the <select> tag to allow this? 1. value="multiple" 2. multiple="yes" 3. multiple="multiple" 4. type="multiple"
3
In Microsoft Internet Explorer, what occurs on a Web form if you omit the closing </form> tag? 1. The form will render but the form fields will appear as blank boxes with "Xs" in them. 2. The form fields will not render. 3. The form fields will render and users will be able to submit information. 4. The form fields will render but users will not be able to submit any information.
4
What happens if you omit the size attribute when you use the <select> tag to create a select list? 1. No more than four items will appear in the list. 2. No items will appear in the list. 3. The scrolling list box will appear as a blank box with an "X" in it. 4. The number of items that will appear in the list by default will depend on the browser.
4
What occurs when a user clicks the Reset button on a Web form? 1. The data from all fields in the form is sent to be processed by the action specified in the <form> tag. 2. All form fields are cleared and the data is submitted. 3. A Choose File dialog box appears, which the user can use to navigate to and select a local file for uploading. 4. All form fields are cleared and set back to their default settings.
4
When creating a Web form, which tag should you use to create a list from which users can choose one or more options? 1. The <textarea> tag 2. The <input> tag 3. The <form> tag 4. The <select> tag
4
When you create a text box field, you should use the maxlength attribute to: 1. specify the visual width of the text box in pixels. 2. specify the visual width of the text box in characters. 3. specify the minimum number of characters a user must enter into the text box. 4. specify the maximum number of characters a user can enter into the text box.
4
Which <form> tag attribute specifies the process required to send form data to a Web server? 1. The action attribute 2. The name attribute 3. The type attribute 4. The method attribute
4
Which <form> tag attribute uses the "get" and "post" values to specify how the browser will send form data to a Web server? 1. The action attribute 2. The name attribute 3. The type attribute 4. The method attribute
4
Which HTML code will produce a Web-user form field that offers the user round buttons with mutually exclusive choices? 1. <select name="Certifications" multiple="multiple> <option>CIW Web Foundations Associate</option> <option>CIW Web Design Professional</option> </select> 2. <input type="checkbox" name="Certifications" value="Associate"/> CIW Web Foundations Associate <input type="checkbox" name="Certifications" value="Professional"/> CIW Web Design Professional 3. <select name="Certifications"> <option>CIW Web Foundations Associate</option> <option>CIW Web Design Professional</option> </select> 4. <input type="radio" name="Certifications" value="Associate"/> CIW Web Foundations Associate <input type="radio" name="Certifications" value="Professional"/> CIW Web Design Professional
4
Which attribute is associated with the <form> element and is used to specify the name and location of the server-side script used to process the form? 1. The method attribute 2. The name attribute 3. The type attribute 4. The action attribute
4
Which of the following can be considered a disadvantage of using FormMail? 1. You must customize FormMail to your specifications before you can use it. 2. You can receive Web form information from FormMail only via email. 3. A Perl interpreter is required before FormMail can receive information from a Web form. 4. It hasn't been maintained for many years and poses several security risks, including a problem wherein it can be fooled into sending email to anyone.
4
Which of the following is a sensible method of reducing spam submissions to Web forms you create? 1. FormMail 2. Common Gateway Interface (CGI) 3. Search engine optimization (SEO) 4. CAPTCHA
4