WorksheetsHTML + CSS Certification
Total questions: 81
Worksheet time: 41mins
Name
Class
Date
1.
Which two outcomes will this code fragment accomplish? (Each correct answer presents a complete solution. Choose two.)
a)
On pre-HTML5 browsers, the happy.wav file will not play, and instead Hello World will be displayed.
b)
On an HTML5 browser that supports .wav files, the happy.wav file will be played and Hello World will be hidden.
c)
On an HTML5 browser that supports .wav files, the happy.wav file will be played and Hello World will be displayed.
d)
on pre-HTMLS browsers, the happy.wav file will play and Hello World will be hidden.
2.
Which three properties can be used with the TouchEvent object in the Safari touch API? (Choose three.)
a)
offsetTop
b)
clientHeight
c)
scale
d)
touches
e)
rotation
3.
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.) a language used to store configuration settings and data
a)
CSS
b)
HTML5
c)
JavaScript
d)
XML
4.
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.) a language that controls the formatting and style of a document
a)
CSS
b)
HTML5
c)
JavaScript
d)
XML
5.
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.) a language that uses tags to display blocks of text and features such as media
a)
CSS
b)
HTML5
c)
JavaScript
d)
XML
6.
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.) a language used to program document object interactions and event responses
a)
CSS
b)
HTML5
c)
JavaScript
d)
XML
7.
Which CSS3 code segment styles the text color of EM elements to be red and semi- transparent?
a)
em { color: rgba(100%, 0%, 0%, 50%) ; }
b)
em { color: rgba(255, 0, 0, 0.5) ; }
c)
em { color: #ff00007f; }
d)
em { color: rgba(255, 0, 0, 127) ; }
8.
Which two terms represent interfaces in the File API? (Choose two.)
a)
Font
b)
Blob
c)
Keygen
d)
FileList
9.
On a Windows touch device, which gesture serves the same purpose as a right-click of the mouse?
a)
swipe
b)
pinch
c)
tap
d)
hold
10.
Which two code segments declare JavaScript functions? (Choose two.)
a)
varfunct= (a);
b)
function Foo(a){ }
c)
var a=new Foo();
d)
Foo=function(a){ ...}
11.
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.) 1.8em
a)
value
b)
property
c)
id selector
d)
declaration
e)
class selector
12.
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.) .container
a)
value
b)
property
c)
id selector
d)
declaration
e)
class selector
13.
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.) #container
a)
value
b)
property
c)
id selector
d)
declaration
e)
class selector
14.
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.) margin-top
a)
value
b)
property
c)
id selector
d)
declaration
e)
class selector
15.
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.) font-family:Arial;
a)
value
b)
property
c)
id selector
d)
declaration
e)
class selector
16.
Which code shows the correct way to nest tags in HTML5?
a)
<p> this is HTML 5 <b><i>text formatting</b></i></p>
b)
<p> this is HTML 5 <b><i>text formatting</p></i></b>
c)
<p> this is HTML 5 <b><i>text formatting</p></b></i>
d)
<p> this is HTML 5 <b><i>text formatting</i></b></p>
17.
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.) Element appears in the order in which it is placed in the document flow
a)
fixed
b)
static
c)
inherit
d)
absolute
18.
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.) Element is positioned relative to the first positioned ancestor
a)
fixed
b)
static
c)
inherit
d)
absolute
19.
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.) Element is positioned relative to the browser window
a)
fixed
b)
static
c)
inherit
d)
absolute
20.
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.) Element is positioned based on its parent element's position
a)
fixed
b)
static
c)
inherit
d)
absolute
21.
Which CSS3 code fragment styles an H2 element only if it is a direct child of a DIV element?
a)
A
b)
B
c)
C
d)
D
22.
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.)
a)
The input areas overlap with other input areas.
b)
The touch screen is not initialized.
c)
The input areas are using event handlers to detect input.
d)
The defined input areas are not large enough.
23.
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?
a)
A
b)
B
c)
C
d)
D
24.
Which layout can you create by using a single CSS3 region?
a)
a table layout
b)
a snaked-column layout
c)
a multiple column liquid layout
d)
a multiple column fixed layout
25.
An HTML5 application can be used without going through a manufacturer's approval process if:
a)
the browser on the device supports HTML5.
b)
the manufacturer has unlocked the device's SIM card.
c)
the application has been compiled.
d)
the developer has the correct application ID.
26.
Which three components define the URL used for localStorage data in HTML5? (Choose three.)
a)
scheme
b)
user credentials
c)
hostname
d)
unique port
e)
query
27.
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.) provides a way to set a regular expression that the value must match
a)
multiple
b)
pattern
c)
placeholder
d)
required
28.
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.) provides a way to set default text until focus is placed in an element
a)
multiple
b)
pattern
c)
placeholder
d)
required
29.
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.) provides a way to set form elements as mandatory
a)
multiple
b)
pattern
c)
placeholder
d)
required
30.
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.) Provides a way to allow more than one file email address in a single input
a)
multiple
b)
pattern
c)
placeholder
d)
required
31.
Which HTML5 tag is used to mark text that has been added to the original document?
a)
<q>
b)
<pre>
c)
<ins>
d)
<i>
32.
When applied to an image, the CSS float:right property:
a)
positions the image to the left and displays all of the text to the right of the image.
b)
positions the image to the right of the region and wraps text around the top, left, and bottom.
c)
positions the image to the left of the region and wraps text around the top, right, and bottom.
d)
positions the image to the right and wraps text to the top and bottom.
33.
Which CSS3 code fragment rounds the corners of a border?
a)
border-image: 50px;
b)
border-clip: 50px concave;
c)
border-radius: 50px;
d)
border-clip: 50px;
34.
You write the following code. (Line numbers are included for reference only.)You need to make the text animate up the screen from a starting position of 400 pixels. Which CSS code fragment should you insert at line 13?
a)
A
b)
B
c)
C
d)
D
35.
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.) *
a)
universal selector
b)
element type selector
c)
pseudo-class
d)
attribute selector
e)
comment
36.
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.) p
a)
universal selector
b)
element type selector
c)
pseudo-class
d)
attribute selector
e)
comment
37.
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.) a:hover
a)
universal selector
b)
element type selector
c)
pseudo-class
d)
attribute selector
e)
comment
38.
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.) input[type="text"]
a)
universal selector
b)
element type selector
c)
pseudo-class
d)
attribute selector
e)
comment
39.
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.) /*this is for
a)
universal selector
b)
element type selector
c)
pseudo-class
d)
attribute selector
e)
comment
40.
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?
a)
div {inline:scroll; }
b)
div {inline:auto; }
c)
div {overflow:scroll; }
d)
div {overflow:auto; }
41.
Which three event attributes are used with the CAPTION element in HTML5? (Choose three.)
a)
onmouseover
b)
ondblclick
c)
onkeydown
d)
onconnect
e)
onabort
42.
What does the following HTML5 code fragment do?
a)
It plays the myVacation.avi video if the browser supports it; otherwise, plays the myVacation.ogg video if the browser supports it.
b)
It plays two videos: first myVacation.avi, and then myVacation.ogg.
c)
It plays both videos simultaneously, myVacation.avi and myVacation.ogg.
d)
It prompts the user to choose which format of the myVacation video it should play, .avi or .ogg.
43.
You add script tags to an HTML page You need to update the text value with in a specific HTML element. You access the HTML element by id. What should you do next?
a)
Use the createTextNode method.
b)
Use the appendChild method.
c)
Set the new text value with the setAttribute method.
d)
Use the firstChild property and set the new text value with the nodeValue property.
44.
Which CSS position value is used to position an element relative to the browser window?
a)
position: relative;
b)
position: absolute;
c)
position: static;
d)
position: fixed;
45.
Which two HTML properties can JavaScript access to change the text value of an HTML element? (Choose two.)
a)
innerHTML
b)
nodeType
c)
title
d)
nodeValue
46.
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?
a)
the tagName property
b)
the className property
c)
the style property
d)
the class attribute
47.
Which three code fragments define an HTML input control? (Choose three.)
a)
<input type="combobox">
b)
<input type="optionbutton">
c)
<input type="url">
d)
<input type="tel">
e)
<input type="search">
48.
When you are testing a touch interface, which two gestures can you simulate by using a mouse? (Choose two.)
a)
tap
b)
pinch
c)
flick
d)
rotate
49.
Which JavaScript method allows you to register multiple handlers for a single touch event?
a)
dispatchEvent
b)
initUIEvent
c)
addEventListener
d)
initEvent
50.
Which code fragment prepares the HTML5 application to be used offline?
a)
<!DOCTYPE html>
b)
<html manifest="app.appcache">
c)
<html xmlns="http://www.w3.org/1991/xhtml">
d)
<html lang="en">
51.
Which two are WebSocket events? (Choose two.)
a)
onconnect
b)
onmessage
c)
ondatarecieved
d)
onopen
52.
Which attribute prefills a default value for an input element in HTML5?
a)
name
b)
placeholder
c)
autocomplete
d)
required
53.
Which code fragment will display an image file while the video is downloading?
a)
< video width="740" height="416" src="fireworks.jpg" >
b)
< video width="740" height="416" poster="fireworks.jpg" >
c)
< video width="740" height="416" autoplay="fireworks.jpg" >
d)
< video width="740" height="416" preload="fireworks.jpg" >
54.
Which HTML5 code fragment shows a way to validate numeric input as having a value from 1 to 100, inclusive?
a)
< input type="num" min="1" max="100" >
b)
< input type="positive" limit="100" >
c)
< input type="number" low="1" high="100" >
d)
< input type="number" min="1" max="100" >
55.
You create an instance named "location" of a geolocation object. Which code fragment will initiate periodic updates of a device's geographic location?
a)
location = navigator.geolocation;
b)
location.watchPosition(showLocation) ;
c)
location.getCurrentPosition(showLocation);
d)
location.clearNatch(watchid);
56.
Which tag is used to create a drop-down list in HTML5?
a)
<ul>
b)
<select>
c)
<datalist>
d)
<dd>
57.
What does "V" stand for in the file type SVG?
a)
Video
b)
Vertical
c)
Vector
d)
Variable
58.
Which two touch gestures require a multi-touch device? (Choose two.)
a)
hold
b)
tap
c)
pinch
d)
spread
59.
When content from a flow is loaded into a region, overflowed content:
a)
attempts to fit into the region by auto-adjusting the styles.
b)
continues into the next region.
c)
is truncated and an error flag is set.
d)
is buffered for download.
60.
Which three are valid JavaScript variables? (Choose three.)
a)
xyz1
b)
Int
c)
_int
d)
1xyz
61.
Which are two features of SVG? (Choose two.)
a)
uses high performance pixel-based graphics
b)
can be modified by using CSS
c)
uses high performance raster-based graphics
d)
can be modified by using JavaScript
62.
In HTML5, the autofocus attribute:
a)
defines the cursor location when a form is first accessed.
b)
controls the movement between fields in a form.
c)
adds a default value to the field in a form.
d)
enables one field and disables all others.
63.
You write the following JavaScript code. (Line numbers are included for reference only.)You need to write a function that will initialize and encapsulate the member variable full name. Which are two possible code fragments you could insert at line 02 to achieve this goal? (Each correct answer presents a complete solution. Choose two.)
a)
A
b)
B
c)
C
d)
D
64.
Which item specifies resources for an offline HTML5 application?
a)
a CSS style sheet
b)
an HTML5 file
c)
a JavaScript File
d)
a cache manifest file
65.
In CSS, the flow-into property deposits
a)
the flow into the content
b)
the regions into a flow.
c)
content into the flow.
d)
the flow into the regions
66.
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);
a)
a circle at the given point
b)
a square at the given point
c)
a semi-circle at the given poin
d)
a line from one point to another
67.
Your HTML5 code includes this code segment:
a)
if (document.getElementById("chocolate").checked == true
b)
if (document.getElementById("chocolate").value = true
c)
if (document.getElementById("chocolate").checked = true
d)
if (document.getElementById("chocolate").value == true
68.
Which HTML5 tag defines superscript text?
a)
< small >
b)
<script>
c)
<sup>
d)
<sub>
69.
Which two CSS properties can be used to position multiple HTML elements next to one another? (Choose two.)
a)
display
b)
position
c)
overflow
d)
float
70.
Which code fragment will display the Play and Pause controls in the audio interface?
a)
< audio controls = "controls" >
b)
< audio preload = "controls" >
c)
< audio preload= "auto" >
d)
< audio autoplay= "autoplay" >
71.
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?
a)
vartxtContents =document.getElementById('text1').value;
b)
vartxtContents = document.getEIementyById('myText').value;
c)
vartxtContents =document.getElementById('text1');
d)
artxtContents = document.getElementById('myText');
72.
When you are working with the path API, what is the purpose of the clip method?
a)
pastes a shape object in from the system clipboard
b)
constrains the rendered output of the shape object
c)
copies the shape object to the system clipboard
d)
stores the shape object for later reference in script
73.
Which CSS property defines which sides of an element where other floating elements are not allowed?
a)
float
b)
position
c)
display
d)
clear
74.
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 to object maybe used once, more than once, or not at all. Each correct match is worth 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 1pt pushState()
a)
document
b)
history
c)
local storage
d)
location
e)
sessionStorage
75.
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 to object maybe used once, more than once, or not at all. Each correct match is worth 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 1pt has an indefinite liftetime
a)
document
b)
history
c)
local storage
d)
location
e)
sessionStorage
76.
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 to object maybe used once, more than once, or not at all. Each correct match is worth 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 1pt onLoad()
a)
document
b)
history
c)
local storage
d)
location
e)
sessionStorage
77.
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 to object maybe used once, more than once, or not at all. Each correct match is worth 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 1pt has a lifetime of the window
a)
document
b)
history
c)
local storage
d)
location
e)
sessionStorage
78.
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 to object maybe used once, more than once, or not at all. Each correct match is worth 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 1pt play()
a)
document
b)
history
c)
local storage
d)
location
e)
sessionStorage
79.
What is the default value of the CSS position property?
a)
fixed
b)
absolute
c)
static
d)
relative
80.
Which two semantic tags are used to define layouts in HTML5? (Choose two.)
a)
<footer>
b)
<head>
c)
<progress>
d)
<section
81.
Which two tags are used with the HTML5 TABLE element? (Choose two.)
a)
<body>
b)
<tfoot>
c)
<td>
d)
<head>
100 %
