Chapter 13-15
In the drop-down list that's defined by this code <select id="style_and_size"> <optgroup label="The New Yorker"> <option value="ny10">10"</option> <option value="ny12">12"</option> <option value="ny16">16"</option> </optgroup> <optgroup label="The Chicago"> <option value="chi10">10"</option> <option value="chi12">12"</option> <option value="chi16">16"</option> </optgroup> </select> how many items can be selected at any given time?
1
How many radio buttons from the following code can be selected at any given time? <input type="radio" name="address" value="Home">Home Address <input type="radio" name="delivery" value="FedEx">Federal Express <input type="radio" name="delivery" value="UPS">UPS
2
How many check boxes from the following code can be selected at any given time? <input type="checkbox" name="address" value="Home">Home Address <input type="checkbox" name="delivery" value="FedEx">Federal Express <input type="checkbox" name="delivery" value="UPS">UPS
3
The CSS3 pseudo-classes for data validation are
:required, :valid, :invalid
When a media player plays a video, it does all but one of the following. Which one is it?
Converts the video to the required codecs
When the user clicks a submit button for a form,
HTML5 validation is done and the data is sent to the server if no errors are found
Which of the following statements is NOT true about email, url, and tel controls?
The browser will automatically validate the entries in all three of these controls.
To print a web page in a readable format, you should try to do all but one of the following. Which one is it?
Use a sans serif font for text other than headings
A codec is a software component that is used to code and decode the algorithms that are used for
a media type
A media type is a container that can include
a video track, one or more audio tracks, and metadata
<video id="videoplayer" src="media/sjv_speakers_sampson.mp4" controls width="480" height="270" loop poster="images/poster.png"> </video> When this code is loaded in a modern browser, which of the following is NOT true?
a. The controls for the video player will be displayed. b. The video will restart automatically when it finishes playing. c. An image will be displayed in the video element before the video starts playing. d. The video will start playing automatically. D. is correct
<video id="videoplayer" src="media/sjv_speakers_sampson.mp4" controls width="480" height="270" loop poster="images/poster.png"> </video> (Refer to example 14-1) This code works because
a. the controls attribute searches for the right media player b. the video element works on all modern browsers c. all modern browsers support the MPEG-4 media type d. the loop attribute searches for the right media player C. is Correct
To implement a search function for your website, you must include
an input element, submit button, and hidden fields that specify the domain for the search and that only that domain should be searched
The HTML5 attributes for data validation are
autocomplete, required, novalidate
When you use a regular expression to validate a form entry, the entry must
be in the pattern that's defined by the pattern attribute of the control
When you set the tab order for the controls of a form, the user can move from control to control
by using the Tab key
When you use a separate style sheet for printing, the link element for the print style sheet
can come before or after the link element for the screen style sheet
In a style sheet for printing, what property do you use to indicate that an element shouldn't be printed?
display
A hidden text field
doesn't appear on the form but its data is sent to the server
When you use Google Web Fonts or Adobe Typekit fonts, you first select a font or fonts. Then, to import the fonts into a web page, you use
either a link or a script element
After you use the CSS3 @font-face selector to embed a font in a web page, you can apply that font to selected HTML elements by using the
font-family property
To set the margins or padding for a printed web page, it makes sense to use which one of these units of measurement?
in
Before you can use the CSS3 @font-face selector, you have to store the font
in any folder of the website
A text area is like a text field but
it can have more than one line of data
When a media player plays a video, it first determines the
media type
When you use an HTML5 video element to add video other than MP3 or MP4 to a web page, you use source elements to specify the
media type and codec for each element
In a list box, the user can select
more than one option but only if the multiple attribute is on
Which of the following HTML5 controls is designed for data that's calculated by JavaScript or server-side code?
output
In a style sheet for printing, if you want a page break to occur before an element is printed, you can use CSS to set the
page-break-before property to always
To put a starting value in a form field when it's first displayed, you can use this field attribute:
placeholder
To provide a label for a control on a form, you should
set the for attribute of the label to the id of the control
To provide a way to automatically send the data in a form to the server, you can add this type of button to the form:
submit
Although the object, param, and embed elements are still supported by modern browsers,
the audio and video elements are easier to use
When form data is sent to the server with the get method,
the data is sent as part of the url
If you assign an access key to a label,
the focus moves to the related control when the user presses the access key
In most cases, you should use the post method instead of the get method for submitting a form because
the form data that's sent is more secure
To associate a field with a data list, you set
the list attribute of the field to the id of the datalist element
In a style sheet for printing, the orphans property can be used to specify
the minimum number of lines in an HTML element that can be printed at the bottom of a page when a page break occurs within the element
By default, when the user presses the Tab key, the focus moves from one control to another in
the sequence that they appear in the HTML, not including labels
To provide the styles for printing a web page, you can use a @media print selector within
the style sheet for displaying the web page
The attributes of a form element specify
the submission method and the URL for the server-side script
When adding audio or video to a website, one problem is that
there isn't a single combination of codecs that will work in all modern browsers
When a link element for a style sheet has a media attribute that specifies "print", that style sheet is used
to override any of the styles in the "screen" style sheet when the page is printed
To align the labels and controls on a form, you can
use CSS to float the labels to the left and set the widths of the labels and controls
To provide video on a modern browser, you just need to code the
video element
Which of the following properties is used to determine the minimum number of lines that can be printed on the next page when a page break occurs within an element?
widows
To stop the browser from automatically displaying entry options when the user starts an entry in a control,
you can turn off the autocomplete attribute for the control
