Question 1
Question
Which layout can you create by using a single CSS3 region?
Question 2
Question
Which two events are supported on touch devices? (Choose two.)
Answer
-
click
-
touchstart
-
selection
-
drag
Question 3
Question
Which positioning scheme places an object in normal document flow?
Answer
-
absolute
-
relative
-
fixed
-
float
Question 4
Question
Which three are valid JavaScript variables? (Choose three.)
Question 5
Question
Which CSS property defines which sides of an element where other floating elements are not allowed?
Answer
-
float
-
position
-
display
-
clear
Question 6
Question
Drag and Drop Question
Match the CSS terms to the corresponding examples. (To answer, drag the appropriate term from the column on the left to its example on the right. Each term may be used once, more than once, or not at all. Each correct match is worth one point.)
Answer
-
value
-
class selector
-
id selector
-
property
-
declaration
Question 7
Question
In CSS, the flow-into property deposits:
Question 8
Question
The variable named "ctx" is the context of an HTML5 canvas object. What does the following code fragment draw? ctx.arc(x, y, r, 0, Math.PI, true);
Answer
-
a circle at the given point
-
a square at the given point
-
a semi-circle at the given point
-
a line from one point to another
Question 9
Question
Which three properties can be used with the TouchEvent object in the Safari touch API? (Choose three.)
Answer
-
offsetTop
-
clientHeight
-
scale
-
touches
-
rotation
Question 10
Question
You create an instance named "ac" of an accelerometer object. Which code fragment will retrieve a single update?
Answer
-
ac = navigator.accelerometer ;
-
ac.getAcceleration (accelerometerFunction) ;
-
ac.watchAcceleration (accelerometerFunction) ;
-
ac.clearWatch (watchid) ;
Question 11
Question
Which three technologies does HTML5 encompass? (Choose three.)
Answer
-
CSS
-
ASP.NET
-
C#
-
JavaScript
-
HTML
Question 12
Question
Which CSS property defines which sides of an element where other floating elements are not allowed?
Answer
-
float
-
position
-
display
-
clear
Question 13
Question
What is the default value of the CSS position property?
Answer
-
fixed
-
absolute
-
static
-
relative
Question 14
Question
Which CSS3 code fragment styles an H2 element only if it is a direct child of a DIV element?
Answer
-
Option A
-
Option B
-
Option C
-
Option D
Question 15
Question
You write the following code to create a page. (Line numbers are included for reference only.)
Answer
-
Option A
-
Option B
-
Option C
-
Option D
Question 16
Question
Which CSS code fragment centers an image horizontally?
Answer
-
Option A
-
Option B
-
Option C
-
Option D
Question 17
Question
Your code includes the following fragment:
<input type="text" name="text1" id="myText" />
You need to add code that will retrieve the contents of the INPUT element. Which JavaScript code
fragment will accomplish this?
Answer
-
vartxtContents =document.getElementById('text1').value;
-
vartxtContents = document.getEIementyById('myText').value;
-
vartxtContents =document.getElementById('text1');
-
vartxtContents = document.getElementById('myText');
Question 18
Question
The data in a specific HTML5 local storage database can be accessed from:
Answer
-
Different browsers on the same device.
-
Different browsers on different devices.
-
The same browser on different devices.
-
The same browser on the same device.
Question 19
Question
You are creating a page by using HTML5. You add script tags to the page. You need to use JavaScript to access an element by id and add a class to the element.
Which property or attribute should you use?
Answer
-
the tagName property
-
the className property
-
the style property
-
the class attribute
Question 20
Question
Which code fragment sets up a timer that calls a function named "adjust" every second?
Answer
-
setTimeout(adjust, 1000);
-
setInterval(adjust, 1000);
-
setInterval(adjust, 1);
-
setTimeout(adjust, 1);
Question 21
Question
Which two HTML properties can JavaScript access to change the text value of an HTML element? (Choose two.)
Answer
-
innerHTML
-
nodeType
-
title
-
nodeValue
Question 22
Question
Web Workers define an API for:
Answer
-
Publishing frequently updated works for syndication.
-
Running scripts in the background,
-
Bi-directional, full-duplex communications over a single TCP socket.
-
Distributing load across multiple web servers.
Question 23
Question
Which two are WebSocket events? (Choose two.)
Answer
-
onconnect
-
onmessage
-
ondatareceived
-
onopen
Question 24
Question
You create an interface for a touch-enabled application. During testing you discover that some touches trigger multiple input areas.
Which situation will cause this problem?
Answer
-
The touch screen is not calibrated.
-
The input areas are too close together.
-
The defined input areas are too small.
-
The input areas are semi-transparent.
Question 25
Question
An HTML5 application can be used without going through a manufacturer's approval process if:
Answer
-
the browser on the device supports HTML5.
-
the manufacturer has unlocked the device's SIM card.
-
the application has been compiled.
-
the developer has the correct application ID.
Question 26
Question
Which item specifies resources for an offline HTML5 application?
Answer
-
a CSS style sheet
-
an HTML5 file
-
a JavaScript file
-
a cache manifest file
Question 27
Question
In HTML5, which two objects in the Web Storage specification are used to store data on the client? (Choose two.)
Answer
-
websocket
-
navigator
-
cache
-
sessionStorage
-
localStorage
Question 28
Question
Which two code fragments represent ways to use HTML5 to save values to session storage? (Choose two.)
Answer
-
Option A
-
Option B
-
Option C
-
Option D
Question 29
Question
When you are testing a touch interface, which two gestures can you simulate by using a mouse? (Choose two.)
Question 30
Question
Which three event attributes are used with the CAPTION element in HTML5? (Choose three.)
Answer
-
onmouseover
-
ondblclick
-
onkeydown
-
onconnect
-
onabort
Question 31
Question
Which HTML5 tag defines superscript text?
Answer
-
< small >
-
<script>
-
<sup>
-
<sub>
Question 32
Question
What does the following HTML5 code fragment do?
Answer
-
It plays the myVacation.avi video if the browser supports it; otherwise, plays the myVacation.ogg video if the browser supports it.
-
It plays two videos: first myVacation.avi, and then myVacation.ogg.
-
It plays both videos simultaneously, myVacation.avi and myVacation.ogg.
-
It prompts the user to choose which format of the myVacation video it should play, .avi or .ogg.
Question 33
Question
Which are two features of SVG? (Choose two.)
Answer
-
uses high performance pixel-based graphics
-
can be modified by using CSS
-
uses high performance raster-based graphics
-
can be modified by using JavaScript
Question 34
Question
Which HTML5 tag is used to display text with a fixed-width font and preserves both spaces and line breaks?
Answer
-
<area>
-
<hr>
-
<pre>
-
<strong>
Question 35
Question
What does "V" stand for in the file type SVG?
Answer
-
Video
-
Vertical
-
Vector
-
Variable
Question 36
Question
Which tag is used to create a drop-down list in HTML5?
Answer
-
<ul>
-
<select>
-
<datalist>
-
<dd>
Question 37
Question
Which attribute prefills a default value for an input element in HTML5?
Answer
-
name
-
placeholder
-
autocomplete
-
required
Question 38
Question
Which two outcomes will this code fragment accomplish? (Each correct answer presents a complete solution. Choose two.)
<audio src="happy.wav" controls="controls">
Hello World
</audio>
Answer
-
On pre-HTML5 browsers, the happy.wav file will not play, and instead Hello World will be displayed.
-
On an HTML5 browser that supports .wav files, the happy.wav file will be played and Hello World will be hidden.
-
On an HTML5 browser that supports .wav files, the happy.wav file will be played and Hello World will be displayed.
-
on pre-HTMLS browsers, the happy.wav file will play and Hello World will be hidden.
Question 39
Question
You create an interface for a touch-enabled application. You discover that some of the input buttons do not trigger when you tap the screen. You need to identify the cause of the problem. What are two possible causes? (Choose two.)
Answer
-
The input areas overlap with other input areas.
-
The touch screen is not initialized.
-
The input areas are using event handlers to detect input.
-
The defined input areas are not large enough.
Question 40
Question
An HTML5 application can run without an Internet connection if:
Answer
-
the application is converted to an executable.
-
the .NET Framework is installed on the client computer.
-
the application specifies the use of a client-side SQL database.
-
the application specifies the use of an ApplicationCache interface.
Question 41
Question
On a Windows touch device, which gesture serves the same purpose as a right-click of the mouse?
Question 42
Question
Which three components define the URL used for localStorage data in HTML5? (Choose three.)
Answer
-
scheme
-
user credentials
-
hostname
-
unique port
-
query
Question 43
Question
Drag and Drop Question
Match the JavaScript objects to the corresponding characteristics or methods. (To answer, drag the appropriate JavaScript object from the column on the left to its characteristic or method on the right. Each JavaScript object may be used once, more than once, or not at all. Each correct match is worth one point.)
Answer
-
history
-
localStorage
-
document
-
sessionStorage
-
location
Question 44
Question
Which two code segments declare JavaScript functions? (Choose two.)
Answer
-
varfunct= (a);
-
function Foo(a){
...
}
-
var a=new Foo();
-
Foo=function(a){
...}
Question 45
Question
You add script tags to an HTML page. You need to update the text value within a specific HTML element. You access the HTML element by id. What should you do next?
Answer
-
Use the createTextNode method.
-
Use the appendChild method.
-
Set the new text value with the setAttribute method.
-
Use the firstChild property and set the new text value with the nodeValue property.
Question 46
Question
You create an instance named "location" of a geolocation object. Which code fragment will initiate periodic updates of a device's geographic location?
Answer
-
location = navigator.geolocation;
-
location.watchPosition(showLocation) ;
-
location.getCurrentPosition(showLocation);
-
location.clearNatch(watchid);
Question 47
Question
You need to use JavaScript to access the "section1" element in the following code fragment:
<div id='section1'>
Which method should you use?
Answer
-
getElementsByTagName
-
getElementById
-
getElementsByName
-
getElementsByClassName
Question 48
Question
Drag and Drop Question
Match the HTML5 technologies to the corresponding descriptions. (To answer, drag the appropriate technology from the column on the left to its description on the right. Each technology may be used once, more than once, or not at all. Each correct match is worth one point.)
Answer
-
XML
-
CSS
-
HTML5
-
JavaScript
-
SOAP
Question 49
Question
Drag and Drop Question
Match the HTML5 input attributes to the corresponding descriptions. (To answer, drag the appropriate attribute from the column on the left to its description on the right. Each attribute may be used once, more than once, or not at all. Each correct match is worth one point.)
Answer
-
pattern
-
placeholder
-
required
-
multiple
-
maxlength
Question 50
Question
Drag and Drop Question
Match the touch events to the corresponding actions. (To answer, drag the appropriate touch event from the column on the left to its action on the right. Each touch event may be used once, more than once, or not at all. Each correct match is worth one point.)
Answer
-
touchcancel
-
touchstart
-
touchend
-
touchmove
Question 51
Question
Which three statements describe cookies? (Choose three.)
Answer
-
They can be created, read, and erased using the document.cookie property.
-
They are limited in size to 5 MB.
-
They are deleted automatically when the session ends.
-
They can be used only by pages on the domain where they were set.
-
They contain the data in the form of a name=value pair.
Question 52
Question
Which two terms represent interfaces in the File API? (Choose two.)
Answer
-
Font
-
Blob
-
Keygen
-
FileList
Question 53
Question
Which two semantic tags are used to define layouts in HTML5? (Choose two.)
Answer
-
<footer>
-
<head>
-
<progress:
-
<section>
Question 54
Question
Which two HTML5 tags format text content only? (Choose two.)
Answer
-
<map>
-
<strong>
-
<canvas>
-
<em>
Question 55
Question
You are developing an HTML5 page. The page includes the following code. The inner paragraph must be exactly 15 pixels from the top left corner of the outer paragraph. You set the left style for the inner paragraph to the appropriate value. You need to set the position property of the inner paragraph. Which value should you use?
<p id="outer" style="position:relative">
<p id ="inner"></p>
</p>
Answer
-
absolute
-
static
-
fixed
-
relative
Question 56
Question
You are developing a customer web form that includes the following HTML input field.
<input id="txtValue"/>
If a customer enters a value in the input field, then it must be a numeric value. You need to add validation to the input field. Which HTML should you use?
Answer
-
<input id="txtValue" type-"text" pattern="/#" />
-
<input id="txtValue" type="number" />
-
<input id="txtVa!ue" type="integer" />
-
<input id="txtValue" type="text" required="required"/>
Question 57
Question
You develop an HTML5 webpage. You have the following HTML markup:
<input type="text" id="username" />
You need to prevent users from entering specific characters into the username field. What should you do?
Answer
-
Using the keyup event, add an anonymous function that returns true when a specific character keycode value is determined.
-
Using the change event, add an anonymous function that returns true when a specific character keycode value is determined.
-
Using the keydown event, add an anonymous function that returns false when a specific character keycode value is determined.
-
Using the change event, add an anonymous function that returns false when a specific character keycode value is determined.
Question 58
Question
Which code shows the correct way to nest tags in HTML5?
Answer
-
Option A
-
Option B
-
Option C
-
Option D
Question 59
Question
Which JavaScript method is used to draw a circle on a canvas?
Answer
-
ellipse
-
circle
-
bezierCurveTo
-
arc
Question 60
Question
Which code fragment will display an image file while the video is downloading?
Answer
-
Option A
-
Option B
-
Option C
-
Option D
Question 61
Question
Which three generic font family names are valid values of the font-family property in CSS? (Choose three.)
Answer
-
cursive
-
system
-
serif
-
fixed
-
fantasy
Question 62
Question
Drag and Drop Question
Match the CSS terms to the corresponding CSS code examples. (To answer, drag the appropriate CSS term from the column on the left to its CSS code example on the right. Each CSS term may be used once, more than once, or not at all. Each correct match is worth one point.)
Answer
-
universal selector
-
element type selector
-
pseudo-class
-
attribute selector
-
comment
Question 63
Question
When applied to an image, the CSS float:right property:
Answer
-
positionsthe image to the left and displays all of the text to the right of the image.
-
positionsthe image to the right of the region and wraps text around the top, left, and bottom.
-
positionsthe image to the left of the region and wraps text around the top, right, and bottom.
-
positionsthe image to the right and wraps text to the top and bottom.
Question 64
Question
Which CSS3 code segment styles the text color of EM elements to be red and semi- transparent?
Answer
-
Option A
-
Option B
-
Option C
-
Option D
Question 65
Question
Which term describes the canvas API?
Answer
-
xml-based
-
vector-based
-
retained-mode
-
immediate-mode
Question 66
Question
Which CSS position value is used to position an element relative to the browser window?
Answer
-
position: relative;
-
position: absolute;
-
position: static;
-
position: fixed;
Question 67
Question
Drag and Drop Question
Match the JavaScript code fragments with the HTML5 local storage functions. (To answer, drag the appropriate code fragment from the column on the left to its local storage function on the right. Each code fragment may be used once, more than once, or not at all. Each correct match is worth one point.)
Answer
-
localStorage.key(0);
-
localStorage.setItem("name", nameData);
-
localStorage.clear();
-
localStorage.removeItem("name");
-
localStorage.getItem("name");
Question 68
Question
You write the following JavaScript code. (Line numbers are included for reference only.)
Answer
-
Option A
-
Option B
-
Option C
-
Option D
Question 69
Question
Your HTML5 code includes this code segment:
Answer
-
Option A
-
Option B
-
Option C
-
Option D
Question 70
Question
Which JavaScript method allows you to register multiple handlers for a single touch event?
Answer
-
dispatchEvent
-
initUIEvent
-
addEventListener
-
initEvent
Question 71
Question
When you are working with the path API, what is the purpose of the clip method?
Answer
-
pastes a shape object in from the system clipboard
-
constrains the rendered output of the shape object
-
copies the shape object to the system clipboard
-
stores the shape object for later reference in script
Question 72
Question
You need to ensure the scope of a variable named j is limited to the block of a single function named foo(). Which JavaScript code fragment will accomplish this?
Answer
-
Option A
-
Option B
-
Option C
-
Option D
Question 73
Question
When you are using the GeoLocation API, which two arguments does the getCurrentPosition function utilize? (Choose two.)
Answer
-
success callback
-
MAC address
-
browser type
-
ip address
-
failure callback
Question 74
Question
Drag and Drop Question
Match the HTML5 elements to the corresponding functions. (To answer, drag the appropriate HTML5 element from the column on the left to its function on the right. Each HTML5 element may be used once, more than once, or not at all. Each correct match is worth one point.)
Answer
-
THEAD
-
TH
-
OPTGROUP
-
FIELDSET
-
COLGROUP
Question 75
Question
Which HTML5 tag is used to mark text that has been added to the original document?
Question 76
Question
Which HTML5 code fragment shows a way to validate numeric input as having a value from 1 to 100, inclusive?
Answer
-
Option A
-
Option B
-
Option C
-
Option D
Question 77
Question
Which element should you use to rotate an SVG square?
Answer
-
path
-
ANIMATETRANSFORM
-
ANIMATEMOTION
-
AREA SHAPE
Question 78
Question
Which three events are valid for the HTML CANVAS element? (Choose three.)
Answer
-
scroll
-
mouseup
-
blur
-
datareceived
-
hover
Question 79
Question
Which code fragment will display the Play and Pause controls in the audio interface?
Answer
-
Option A
-
Option B
-
Option C
-
Option D
Question 80
Question
You write the following code. (Line numbers are included for reference only.)
Answer
-
Option A
-
Option B
-
Option C
-
Option D
Question 81
Question
Which code fragment prepares the HTML5 application to be used offline?
Answer
-
Option A
-
Option B
-
Option C
-
Option D
Question 82
Question
You need to retrieve a value from local storage by using the key "aardvark." Which code fragment should you use?
Answer
-
Option A
-
Option B
-
Option C
-
Option D
Question 83
Question
What value does the following JavaScript code fragment store into the variable num?
varnum = localStorage.length;
Answer
-
maximum length of a character string
-
potential capacity of local storage
-
number of bytes available in local storage
-
number of key-value pairs in local storage
Question 84
Question
Which two touch gestures require a multi-touch device? (Choose two.)
Question 85
Question
In HTML5, the autofocus attribute:
Answer
-
defines the cursor location when a form is first accessed.
-
controls the movement between fields in a form.
-
adds a default value to the field in a form.
-
enables one field and disables all others.
Question 86
Question
Which two tags are used with the HTML5 TABLE element? (Choose two.)
Answer
-
<body>
-
<tfoot>
-
<td>
-
<head>
Question 87
Question
Which CSS3 code segment styles the text color of EM elements to be red and semitransparent?
Answer
-
Option A
-
Option B
-
Option C
-
Option D
Question 88
Question
You add a div object to a page.
Which CSS3 code fragment will add a scrollbar only if the content exceeds the width or height of the object?
Answer
-
Option A
-
Option B
-
Option C
-
Option D
Question 89
Question
Match the CSS position property values to the corresponding descriptions. (To answer, drag each value from the column on the left to its description on the right. Each value may be used once, more than once, or not at all. Each correct match is worth one point.)
Answer
-
Static
-
absolute
-
fixed
-
relative
-
inherit
Question 90
Question
When content from a flow is loaded into a region, overflowed content:
Answer
-
attempts to fit into the region by auto-adjusting the styles.
-
continues into the next region.
-
is truncated and an error flag is set.
-
is buffered for download.
Question 91
Question
Which CSS3 code fragment rounds the corners of a border?
Question 92
Question
Which two CSS properties can be used to position multiple HTML elements next to one another? (Choose two.)
Answer
-
display
-
position
-
overflow
-
float
Question 93
Question
Which CSS3 code fragment will style only the external links in an HTML document?
Answer
-
Option A
-
Option B
-
Option C
-
Option D
Question 94
Question
Which three code fragments define an HTML input control? (Choose three.)
Answer
-
Option A
-
Option B
-
Option C
-
Option D
-
Option E