NEW
Font size
S
M
L
XL
WorksheetsAdvanced HTML and CSS Part II
Total questions: 40
Worksheet time: 20mins
Name
Class
Date
1.
Which *New* element did HTML5 introduce to play auido files natively withing the browser?
a)
<audio>
b)
<iTunes>
c)
<embed>
d)
<script>
2.
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
3.
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
4.
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
5.
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>
6.
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
7.
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
8.
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
9.
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
10.
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
11.
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:
12.
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
13.
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
14.
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
15.
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
16.
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)"
17.
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
18.
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
19.
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>
20.
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
21.
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
22.
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
23.
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
24.
Which HTML5 attribute can be used with HTML5 date input type to limit date selection?
a)
maxlength
b)
max
c)
multiple
d)
pattern
25.
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);
26.
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
27.
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;
28.
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
29.
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
30.
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
31.
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
32.
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
33.
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
34.
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>
35.
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
36.
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
37.
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
38.
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
39.
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
40.
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
Reset
