Page contents

New Perspectives on HTML CSS and XML Comprehensive 4th Edition by Patrick Carey

Instant delivery only

In Stock

$28.00

Add to Wishlist
Add to Wishlist
Compare
SKU:tb1001143

New Perspectives on HTML CSS and XML Comprehensive 4th Edition by Patrick Carey

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.

ANS: F PTS: 1 REF: HTML 397

  1. The earliest and most common of the languages used for server-based programs are called CGI scripts, written in a language called Perl.

ANS: T PTS: 1 REF: HTML 398

  1. PHP and ASP are popular languages widely used today for writing server-based programs.

ANS: T PTS: 1 REF: HTML 398

  1. The get method appends the form data to the end of the URL specified in the action attribute.

ANS: T PTS: 1 REF: HTML 400

  1. Typically, forms only contain form elements and no page elements.

ANS: F PTS: 1 REF: HTML 399

  1. Among the attributes included with the <form> tag are attributes that include information on how to process the form.

ANS: T PTS: 1 REF: HTML 399

  1. A single Web page can contain at most one form.

ANS: F PTS: 1 REF: HTML 399

  1. One way of organizing a form is to group similar fields into field sets.

ANS: T PTS: 1 REF: HTML 402

  1. A password text box hides text entered by the user.

ANS: T PTS: 1 REF: HTML 405

  1. 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.

ANS: T PTS: 1 REF: HTML 408

  1. Field sets are block elements that limit the numbers of characters the text box can hold.

ANS: F PTS: 1 REF: HTML 404

  1. HTML allows you to formally link a label with an associated text box element for scripting purposes.

ANS: T PTS: 1 REF: HTML 408

  1. 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.

ANS: T PTS: 1 REF: HTML416

  1. An access key is a single key that you type in conjunction with the Alt key for Macintosh users.

ANS: F PTS: 1 REF: HTML 408

  1. When the <input> tag is used to create radio buttons, the tag also creates labels for radio buttons.

ANS: F PTS: 1 REF: HTML429

  1. Users are limited to a single selection from a selection list.

ANS: F PTS: 1 REF: HTML 422

  1. Check boxes are selected by default.

ANS: F PTS: 1 REF: HTML 437

  1. A command button runs a command that affects the contents of the Web page or the Web browser itself.

ANS: T PTS: 1 REF: HTML 456

  1. Data values do not need to be tested or validated before they are used.

ANS: F PTS: 1 REF: HTML 461

  1. One advantage of the current validation checks is that they occur after a user has completed and submitted the form.

ANS: F PTS: 1 REF: HTML 466

MODIFIED TRUE/FALSE

  1. Input boxes are a form control element used for text and numerical entries. ____________________

ANS: T PTS: 1 REF: HTML 397

  1. Option lists are a form control element for long lists of options. ____________________

ANS: F, Selection

PTS: 1 REF: HTML 397

  1. The earliest and most common server-based programs are CGI scripts written in a language called Perl. ____________________

ANS: T PTS: 1 REF: HTML 398

  1. The get method sends form data in a separate data stream. ____________________

ANS: F, post method

PTS: 1 REF: HTML 400

  1. The language used to create a server-based program depends on the Web server. ____________________

ANS: T PTS: 1 REF: HTML 399

  1. The <table> tag identifies the beginning of a form. ____________________

ANS: F, form

PTS: 1 REF: HTML 399

  1. The <form> tag includes attributes that control how the form is processed. ____________________

ANS: T PTS: 1 REF: HTML 399

  1. To associate text with a control element, you can use the label element.. ____________________

ANS: T PTS: 1 REF: HTML 408

  1. When you link a label with an associated input box element, you use the name attribute of the field. ____________________

ANS: F, id

PTS: 1 REF: HTML 408

  1. 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

PTS: 1 REF: HTML 416

  1. 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

PTS: 1 REF: HTML 408

  1. A selection list is a list box that presents users with a group of possible field values for the data field. ____________________

ANS: T PTS: 1 REF: HTML 422

  1. Like selection list items, only one radio button can be selected at a time. ____________________

ANS: F, Unlike

PTS: 1 REF: HTML 429

  1. A control element that allows extended text entries is the textarea element. ____________________

ANS: T PTS: 1 REF: HTML 366

  1. 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.____________________

ANS: T PTS: 1 REF: HTML 447

MULTIPLE CHOICE

  1. Information entered into a field is called the field ____.

a.

index

c.

attribute

b.

rating

d.

value

ANS: D PTS: 1 REF: HTML 397

  1. 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

  1. 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

  1. Selection lists usually appear in a ____ box.

a.

value list

c.

form

b.

radio

d.

drop-down list

ANS: D PTS: 1 REF: HTML 426

  1. As shown in the accompanying figure, the form contains ____ elements, which are commonly used in Web page forms.

a.

control

c.

access

b.

formula

d.

box

ANS: A PTS: 1 REF: HTML 459

  1. The item marked ____ in the accompanying figure is an input box.

a.

1

c.

4

b.

2

d.

6

ANS: A PTS: 1 REF: HTML 407

  1. The item marked ____ in the accompanying figure is a selection list.

a.

1

c.

3

b.

2

d.

6

ANS: B PTS: 1 REF: HTML 425

  1. The items marked 3 in the accompanying figure are ____ buttons.

a.

check

c.

option

b.

group

d.

cluster

ANS: C PTS: 1 REF: HTML 431

  1. The item marked 4 in the accompanying figure is a(n) ____ button.

a.

report

c.

option

b.

reset

d.

spinner control

ANS: D PTS: 1 REF: HTML 447

  1. The item marked 6 in the accompanying figure is a ____ area.

a.

registration

c.

text

b.

form

d.

list

ANS: C PTS: 1 REF: HTML 436

  1. The item marked 5 in the accompanying figure is a ____ box.

a.

text

c.

check

b.

field

d.

form

ANS: C PTS: 1 REF: HTML 438

  1. Option buttons are sometimes called ____ buttons.

a.

group

c.

radio

b.

cluster

d.

aggregate

ANS: C PTS: 1 REF: HTML 429

  1. 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

  1. CGI scripts can be written in which of the following languages?

a.

TCP

c.

Perl

b.

JavaScript

d.

Any of the above

ANS: C PTS: 1 REF: HTML 398

  1. Forms are created using the ____ element.

a.

<field>

c.

<html>

b.

<form>

d.

<input>

ANS: B PTS: 1 REF: HTML 399

  1. 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

  1. The ____ attribute has two possible values: get and post.

a.

value

c.

method

b.

id

d.

name

ANS: C PTS: 1 REF: HTML 400

  1. ____ sets are used to organize form elements.

a.

Option

c.

Text

b.

Radio

d.

Field

ANS: D PTS: 1 REF: HTML 402

  1. HTML 4 supports ____ different input types.

a.

10

c.

16

b.

15

d.

17

ANS: A PTS: 1 REF: HTML 404

  1. 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

  1. 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

  1. 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

  1. 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

  1. 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

  1. 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

  1. 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

  1. 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

  1. 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

  1. Label elements are normally ____ elements.

a.

inside

c.

inline

b.

outline

d.

outside

ANS: C PTS: 1 REF: HTML 412

  1. 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

  1. 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

  1. 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

  1. To define a default field value, add the attribute ____.

a.

size =”value”

c.

input =”value”

b.

value=”value”

d.

value = “chars”

ANS: B PTS: 1 REF: HTML 415

  1. 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

  1. 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

  1. 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

  1. 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

  1. Press the ____ key to move between input boxes.

a.

Shift

c.

Ctrl

b.

Tab

d.

Alt

ANS: B PTS: 1 REF: HTML 408

  1. 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

  1. 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

  1. ____ 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

  1. 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

  1. 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

  1. 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

Reviews

There are no reviews yet.

Write a review

Your email address will not be published. Required fields are marked *

Product has been added to your cart