NEW
Font size
S
M
L
XL
WorksheetsAdvanced HTML5 & CSS3 Part IV
Total questions: 55
Worksheet time: 27mins
Name
Class
Date
1.
Which attribute provides the user with a way to control the play of the audio: start/stop, jump to any point on the audio track, mute, and adjust volume?
a)
jukebox
b)
controls
c)
playsong
d)
loop
2.
Adding the ________ attribute to the <audio> element, we can recommend to the browser what to do with the audio file when the web page loads:
a)
play
b)
controls
c)
preload
d)
que
3.
The _______ attribute lets us tell the browser to play the audio track continuously until the user stops or pauses it:
a)
repeat
b)
play
c)
controls
d)
loop
4.
Which code can be handy if we want to play background music that never stops?
a)
<audio
src="audio/background.mp3" autoplay
loop></audio>
b)
<p>Listen
to my favorite song:</p>
<audio
src="audio/song.mp3"
controls autoplay></audio>
5.
Requests the browser to download just the beginning chunk of the audio file, which is enough to determine and display the track length.
a)
auto
b)
metadata
c)
none
6.
Requests the browser to download the audio file automatically in the background, without waiting for the user to click on the play button.
a)
auto
b)
metadata
c)
none
7.
Requests the browser not to download any portion of the audio file unless the user clicks on play. No track length will be displayed.
a)
none
b)
auto
c)
metadata
8.
HTML5 introduced the <audio> element. The goal of this new element is to play audio files natively within the browser. Doing so carries which advantages?
a)
No need for installing, maintaining, and updating specific browser plug-ins.
b)
Faster and smoother performance, since no plug-ins or JavaScript need to be loaded.
c)
More consistency in behavior among the different browsers, versions, and platforms.
d)
All of the Above
9.
If you want to make an image blend into the page background by giving it a sense of transparency, which coding approach would accomplish this?
a)
Apply CSS opacity property to the image
b)
Apply the HTML clear attibute in the <img> element
c)
Apply the CSS transparency property to the image
d)
Apply the HTML box-shadow attribute in the <img> element
10.
Which choice uses the correct syntax for a CSS rule in an external style sheet?
a)
p {text-align: "center" color: "red"}
b)
p {text-align: center; color: red; }
c)
{p: text-align: center; color: red; }
d)
p text-align=center; color=red:
11.
If a browser does not support the provided video format which HTML5 code should be inserted in the video page to display a text notice in place of the video if it is not supported?
a)
The type attribute
b)
The <source></source> tag
c)
The poster attribute
d)
The <video></video> tags
12.
Choose which result the code will yield
a)
Nothing, there is a load-time error in the script
b)
"Inventory status is good" appears in the browser document
c)
Nothing, there is a run-time error in the script
d)
"Order more items" appears in the browser document
13.
Using Responsive Web Design (RWD) ensures that site will display correctly in all desktop browsers and mobile devices.
You used a grid-based layout and resize-able images, which is another RWD technique that you can use in responsive design?
You used a grid-based layout and resize-able images, which is another RWD technique that you can use in responsive design?
a)
Use relative units, such as percentages, for positioning page elements
b)
Use standard page structure elements, including <header>, <footer> and <article>, because older devices will display content in the structure elements correctly
c)
Use static pixels for all content positioning
d)
Use smaller fonts for all body text, to ensure it will appear correctly on smaller screens
14.
Consider the following code:
<input type="text" patter="/d{1,2}/\d{1,2}/\d{4}">
What information format does this pattern check for?
<input type="text" patter="/d{1,2}/\d{1,2}/\d{4}">
What information format does this pattern check for?
a)
Digits
b)
Country code
c)
Date
d)
Price
15.
Consider the following Code:
Which statement defines the even listener in this code, specifying that this image can be dragged on the screen by the user?
Which statement defines the even listener in this code, specifying that this image can be dragged on the screen by the user?
a)
draggable="true"
b)
id="drag1"
c)
src="images/logo.pgn"
d)
ondragstart="drag(event)"
16.
To ensure a site's pages render as expected by the target audience, regardless of the device used to access them, which design model should be followed?
a)
Dual platform design
b)
HTML Transitional 1.0 design
c)
Responsive Web Design
d)
Cascadingd Style Sheet design
17.
Which term describes a named set of JavaScript statements that performs a task or calculates a value, can be used multiple times, and can be processed or invoked by other parts of the script?
a)
An event
b)
A parameter
c)
An object
d)
A function
18.
Which HTML5 structure element is intended to contain the page's primary content, which is directly related to the page's subject?
a)
<body>
b)
<div>
c)
<section>
d)
<main>
19.
Which technology, when combined with HTML, will provide the most consistent and accessible interface for your Web Site?
a)
Flash
b)
PHP
c)
JavaScript
d)
CSS
20.
Which of the following delivers style instructions based on device capabilities such as screen width?
a)
HTML5 rel attribute
b)
HTML5 type attribute
c)
CSS3 media queries
d)
CSS3 media properties
21.
Which statement is accurate regarding mobile Web sites and mobile applications?
a)
Mobile Web sites are more expensive
b)
Mobile Web sites are created with programming languages such as Objective-C
c)
Mobile applications run within a mobile device browser
d)
Mobile Web sites are easier to create than mobile applications
22.
After a Web site is developed, which practice is most important to complete prior to publishing the site?
a)
Validate 2D and 3D graphics using http://get.webgl.org
b)
Register the site's domain name with the W3C
c)
Check functionality of internal links with the W3C markup validator
d)
Test the site on various devices and platforms
23.
Which HTML5 attribute can be used with HTML5 date input type to limit date selection?
a)
maxlength
b)
max
c)
multiple
d)
pattern
24.
Consider the following code:
var x = 3; vary = "4";
Which JavaScript statement will correctly return the mathematical sum of variables x and y?
var x = 3; vary = "4";
Which JavaScript statement will correctly return the mathematical sum of variables x and y?
a)
alert (parseInt (x)+y);
b)
alert () {x + parseInt (y)};
c)
alert (x + parseInt (y)};
d)
alert (x + y);
25.
The HTML5 Canvas API supports only one primitive shape. All other shapes are created by using a collection of functions and combining one or more paths. What primitive shape does the Canvas API support?
a)
Rectangle
b)
Square
c)
Circle
d)
Polygon
26.
Which declaration can be applied to images (and other elements) on your Web page to help prevent content from exceeding the width of a mobile device screen?
a)
max-width: 100pt;
b)
max-width: 100em;
c)
max-width: 100%;
d)
max-width: 100px;
27.
Jeff wants to create smooth buttons for his Web pages easily and quickly. Which CSS3 property rounds the corners on the elements that he uses for the buttons?
a)
border-box-shadow
b)
border-style
c)
border-radius
d)
border-image
28.
Niesha needs to modify her company's Web site so that when a visitor's browser returns to where it left off in the slideshow. Which HTML5 API can Niesha use to accomplish this?
a)
This History API
b)
The Canvas API
c)
The File API
d)
The Geolocation API
29.
Which CSS positioning scheme allow an element to remain in the same position even when the page is scrolled?
a)
Absolute
b)
Relative
c)
Static
d)
Fixed
30.
When creating the manifest file and ensuring that the manifest attribute in the <html> is correct, which choice shows the correct text for the first line of text?
a)
MANIFEST
b)
#MANIFEST
c)
#CACHE MANIFEST
d)
CACHE MANIFEST
31.
A game company wants the user to be able to play a game without using any browser plug-ins. The game must dynamically draw the main character and two enemies when the page loads. Which approach best uses the resources on visitors' devices to accomplish this?
a)
The Canvas API
b)
The <video> element
c)
Flash animation
d)
A Java applet
32.
Which HTML5 input type can be used to limit the input that users ener to rational integers or float values?
a)
tel
b)
number
c)
range
d)
float
33.
You are preparing to validate several new pages for your company Web site. Which element determines the code version or specification that the code validator will use to check your document's code?
a)
<!DOCTYPE>
b)
<meta>
c)
<link>
d)
<html>
34.
Which guideline can help improve your page layout to be easier to read and navigate?
a)
Include video to relay your message as much as possible
b)
Provide content that is clear and concise
c)
Provide detailed text on the home page explaining the site's content
d)
Include multiple topics on each page
35.
What is an important usability consideration for mobile and handheld device users?
a)
Users should never be expected to enter data in a Web form using a mobile device
b)
Touchscreen keyboards and small mobile device screens make it more difficult for users to enter information
c)
Web forms designed for small mobile device screens should look exactly like the full-site version to avoid confusion
d)
Touchscreen keyboards allow mobile device users to enter information faster so you can collect more detailed data
36.
Which of the following does JavaScript use to send HTTP or HTTPS requests to a Web Server?
a)
The history.pushState method
b)
The handleFileSelect even handler
c)
The XMLHttpRequest object
d)
The HTTPrequest function
37.
Which is most likely the cause for content getting pushed off the screen at smaller resolution mobile devices?
a)
The use of pixels to specify fixed sizes for elements
b)
The use of responsive Web design to adapt to smaller screens
c)
The use of relative measurement units for layout and image sizes
d)
The use of flexible-sized elements using percentages
38.
Which CSS3 property rounds the corners on the elements that is used for the buttons?
a)
border-box-shadow
b)
border-style
c)
border-radius
d)
border-image
39.
Which *New* element did HTML5 introduce to play auido files natively withing the browser?
a)
<audio>
b)
<iTunes>
c)
<embed>
d)
<script>
40.
Which choice correctly identifies the boxes included in the CSS Box Model
a)
Border, margin, padding, aside
b)
Content, padding, border, margin
c)
Header, footer, paddingd
d)
Content, header, padding, margin, border
41.
Which of the following is a JavaScript event handler designed to process radio or checkbox object events?
a)
onclick
b)
onsubmit
c)
click
d)
submit
42.
In JavaScript, toUpperCase () is an example of.......
a)
casting
b)
a calling statement
c)
an argument
d)
a built-in function
43.
Which statement defines the event listener in a code specifying that an image can be dragged on the screen by the user?
a)
draggable="true"
b)
id="drag1"
c)
src="images/logo.png"
d)
ondragstart="drag(event)"
44.
You are entering information into a form to create a new user profile on a public library Web site. User input validation can check for what in this form?
a)
Improper format and empty form fields
b)
False information and empty form fields
c)
Improper format and misspelled names
d)
Misspelled names and false information
45.
Which term describes a container that stores a value and can be accessed repeatedly in your JavaScript code?
a)
An expression
b)
A variable
c)
An instance
d)
A literal
46.
You are entering information into a Web form. You notice that each text box displays an example of the expected input, which disappears when you start typing. Which HTML5 global attribute can provide this functionality?
a)
label
b)
required
c)
value
d)
placeholder
47.
Which choice lists examples of built-in JavaScript objects?
a)
prompt, navigator and document
b)
navigator, window and document
c)
alert, window and document
d)
prompt, alert and document
48.
The @keyframes rule is used to define what type of CSS3 effect?
a)
2D transformations
b)
3D transformations
c)
Animations
d)
Transitions
49.
What is the most effective way to add a drop-shadow effect to all <h1> headings on the site?
a)
Use the CSS3 text-shadow property to style the <h1> elements
b)
Use JavaScript to insert the drop-shadow behind the <h1> elements on the site.
c)
Use the CSS3 text-emphasis property inline for all <h1> elements
d)
Use an image editor to create graphics for all <h1> elements on the site.
50.
What is the purpose of MobileOK Checker?
a)
It determines the Web site's level of mobile device friendliness.
b)
It shows how your page will render in various accessibility clients.
c)
It validates the Web site for mobile device plug-in compatibility.
d)
It displays how your page will render on various mobile platforms
51.
Which choice uses the correct syntax to link a Web page to an external style sheet?
a)
<style type="text/css" href="css/main.css"/>
b)
style {type="text/css" rel="stylesheet" href="css/main.css";}
c)
link {rel="text/css" href="css/main.css";}
d)
<link rel="stylesheet" type="text/css" href="css/main.css"/>
52.
Which choice uses the correct syntax for a CSS rule in an external style sheet?
a)
p {text-align:"center" color:"red"}
b)
p {text-align:center; color:red;}
c)
{p: text-align: center; color:red;}
d)
p text-align=center; color=red:
53.
Which code uses the correct syntax to create a click-to-call link on a mobile Web site?
a)
<a href="tel:18005551212">Call Us Now!</a>
b)
<a href="call:18005551212">Call Us Now!</a>
c)
<a tel="18005551212">Call Us Now!</a>
d)
<a call="sms:18005551212">Call Us Now!</a>
54.
Which code uses the correct syntax to create a click-to-call link on a mobile Web site?
a)
<a href="tel:18005551212">Call Us Now!</a>
b)
<a href="call:18005551212">Call Us Now!</a>
c)
<a tel="18005551212">Call Us Now!</a>
d)
<a call="sms:18005551212">Call Us Now!</a>
55.
The National Zoo has hired Marco to develop a mobile Web site that visitors can use to navigate the zoo. One of the site requirements is locating the user's position within the zoo. Marco has decided to use the HTML5 Geolocation API in the site to meet this requirement. However, he also wants to respect the privacy concerns of zoo visitors. How can this be accomplished?
a)
Depending on the user's security settings, browsers will send the user a JavaScript alert by default shen using the API, stating that the Web application is identifying their location.
b)
Depending on the user's security settings, browsers will send the user a request by default to approve this action before the API identifies the user's location.
c)
Browsers will allow the API to functions by default, so Marco should add a javaScript alert informing users how to disable the API in the browser if they do not want their location identified.
d)
Browsers will identify the user's location by default when using the API, but will send the user a request to use the information in the Web application
Reset
