wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

HTML5 App Development

Total questions: 67

Worksheet time: 1hrs 7mins

Name
Class
Date
1.

When applied to an image, the CSS float:right property:

a)

A. positionsthe image to the left and displays all of the text to the right of the image.

b)

B. positionsthe image to the right of the region and wraps text around the top, left, and bottom.

c)

C. positionsthe image to the left of the region and wraps text around the top, right, and bottom.

d)

D. positionsthe image to the right and wraps text to the top and bottom.

2.

Which CSS3 code segment styles the text color of EM elements to be red and semi-transparent?

a)

A. Option A

b)

B. Option B

c)

C. Option C

d)

D. Option D

3.

Which CSS position value is used to position an element relative to the browser window?

a)

A. position: relative;

b)

B. position: absolute;

c)

C. position: static;

d)

D. position: fixed;

4.

What is the default value of the CSS position property?

a)

A. fixed

b)

B. absolute

c)

C. static

d)

D. relative

5.
a)

A. Option A

b)

B. Option B

c)

C. Option C

d)

D. Option D

6.

Which code fragment prepares the HTML5 application to be used offline?

a)

A. Option A

b)

B. Option B

c)

C. Option C

d)

D. Option D

7.

You need to retrieve a value from local storage by using the key "aardvark."

Which code fragment should you use?

a)

A. Option A

b)

B. Option B

c)

C. Option C

d)

D. Option D

8.

What value does the following JavaScript code fragment store into the variable num? varnum = localStorage.length;

a)

A. maximum length of a character string

b)

B. potential capacity of local storage

c)

C. number of bytes available in local storage

d)

D. number of key-value pairs in local storage

9.

Which two touch gestures require a multi-touch device? (Choose two.)

a)

A. hold,tap

b)

B. tap,pinch

c)

C. pinch,spread

d)

D. spread,pinch

10.

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)

A. Option A

b)

B. Option B

c)

C. Option C

d)

D. Option D

11.

When content from a flow is loaded into a region, overflowed content:

a)

A. attempts to fit into the region by auto-adjusting the styles.

b)

B. continues into the next region.

c)

C. is truncated and an error flag is set.

d)

D. is buffered for download.

12.

Which CSS3 code fragment rounds the corners of a border?

a)

A. border-image: 50px;

b)

B. border-clip: 50px concave;

c)

C. border-radius: 50px;

d)

D. border-clip: 50px;

13.

Which two CSS properties can be used to position multiple HTML elements next to one another? (Choose two.)

a)

A. display ,position

b)

B. position ,float

c)

C. overflow ,float

d)

D. float , display

14.

Which CSS3 code fragment will style only the external links in an HTML document?

a)

A. Option A

b)

B. Option B

c)

C. Option C

d)

D. Option D

15.

Which CSS3 code fragment styles an H2 element only if it is a direct child of a DIV element?

a)

A. Option A

b)

B. Option B

c)

C. Option C

d)

D. Option D

16.

Which CSS property defines which sides of an element where other floating elements are not allowed?

a)

A. float

b)

B. position

c)

C. display

d)

D. clear

17.
a)

A. Option A

b)

B. Option B

c)

C. Option C

d)

D. Option D

18.

Which layout can you create by using a single CSS3 region?

a)

A. a table layout

b)

B. a snaked-column layout

c)

C. a multiple column liquid layout

d)

D. a multiple column fixed layout

19.

In CSS, the flow-into property deposits:

a)

A. the flow into the content.

b)

B. the regions into a flow.

c)

C. the flow into the regions.

d)

D. content into the flow.

20.

Which CSS code fragment centers an image horizontally?

a)

A. Option A

b)

B. Option B

c)

C. Option C

d)

D. Option D

21.

Which positioning scheme places an object in normal document flow?

a)

A. absolute

b)

B. relative

c)

C. fixed

d)

D. float

22.

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. a circle at the given point

b)

B. a square at the given point

c)

C. a semi-circle at the given point

d)

D. a line from one point to another

23.

Which three are valid JavaScript variables?

a)

A. xyz1 , int1, 1xyz

b)

B. .Int , xyz1 , int1

c)

C. int1 , xyz1 , _int

d)

D. _int , 1xyz , .Int

e)

E. 1xyz , int1 , .Int

24.

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)

A. vartxtContents =document.getElementById('text1').value;

b)

B. vartxtContents = document.getEIementyById('myText').value;

c)

C. vartxtContents =document.getElementById('text1');

d)

D. vartxtContents = document.getElementById('myText');

25.

Which two events are supported on touch devices?

a)

A. click , touchstart

b)

B. touchstart ,selection

c)

C. selection , click

d)

D. drag , selection

26.

The data in a specific HTML5 local storage database can be accessed from:

a)

A. Different browsers on the same device.

b)

B. Different browsers on different devices.

c)

C. The same browser on different devices.

d)

D. The same browser on the same device.

27.

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)

A. the tagName property

b)

B. the className property

c)

C. the style property

d)

D. the class attribute

28.

Which code fragment sets up a timer that calls a function named "adjust" every second?

a)

A. setTimeout(adjust, 1000);

b)

B. setInterval(adjust, 1000);

c)

C. setInterval(adjust, 1);

d)

D. setTimeout(adjust, 1);

29.

Which two HTML properties can JavaScript access to change the text value of an HTML element? (Choose two.)

a)

A. innerHTML

b)

B. nodeType

c)

C. title

d)

D. nodeValue

30.

Web Workers define an API for:

a)

A. Publishing frequently updated works for syndication.

b)

B. Running scripts in the background,

c)

C. Bi-directional, full-duplex communications over a single TCP socket.

d)

D. Distributing load across multiple web servers.

31.

Which two are WebSocket events? (Choose two.)

a)

A. onconnect

b)

B. onmessage

c)

C. ondatareceived

d)

D. onopen

32.

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?

a)

A. The touch screen is not calibrated.

b)

B. The input areas are too close together.

c)

C. The defined input areas are too small.

d)

D. The input areas are semi-transparent.

33.

An HTML5 application can be used without going through a manufacturer's approval process if:

a)

A. the browser on the device supports HTML5.

b)

B. the manufacturer has unlocked the device's SIM card.

c)

C. the application has been compiled.

d)

D. the developer has the correct application ID.

34.

Which item specifies resources for an offline HTML5 application?

a)

A. a CSS style sheet

b)

B. an HTML5 file

c)

C. a JavaScript file

d)

D. a cache manifest file

35.

In HTML5, which two objects in the Web Storage specification are used to store data on the client? (Choose two.)

a)

A. websocket

b)

B. navigator

c)

C. cache

d)

D. sessionStorage

e)

E. localStorage

36.

Which two code fragments represent ways to use HTML5 to save values to session storage? (Choose two.)

a)

A. Option A

b)

B. Option B

c)

C. Option C

d)

D. Option D

37.

When you are testing a touch interface, which two gestures can you simulate by using a mouse? (Choose two.)

a)

A. tap

b)

B. pinch

c)

C. flick

d)

D. rotate

38.

Which three event attributes are used with the CAPTION element in HTML5? (Choose three.)

a)

A. onmouseover

b)

B. ondblclick

c)

C. onkeydown

d)

D. onconnect

e)

E. onabort

39.

Which HTML5 tag defines superscript text?

a)

A. < small >

b)

B. <script>

c)

C. <sup>

d)

D. <sub>

40.

What does the following HTML5 code fragment do?

a)

A. It plays the myVacation.avi video if the browser supports it; otherwise, plays the myVacation.ogg video if the browser supports it.

b)

B. It plays two videos: first myVacation.avi, and then myVacation.ogg.

c)

C. It plays both videos simultaneously, myVacation.avi and myVacation.ogg.

d)

D. It prompts the user to choose which format of the myVacation video it should play, .avi or .ogg.

41.

Which are two features of SVG? (Choose two.)

a)

A. uses high performance pixel-based graphics

b)

B. can be modified by using CSS

c)

C. uses high performance raster-based graphics

d)

D. can be modified by using JavaScript

42.

Which HTML5 tag is used to display text with a fixed-width font and preserves both spaces and line breaks?

a)

A. <area>

b)

B. <hr>

c)

C. <pre>

d)

D. <strong>

43.

What does "V" stand for in the file type SVG?

a)

A. Video

b)

B. Vertical

c)

C. Vector

d)

D. Variable

44.

Which tag is used to create a drop-down list in HTML5?

a)

A. <ul>

b)

B. <select>

c)

C. <datalist>

d)

D. <dd>

45.

Which attribute prefills a default value for an input element in HTML5?

a)

A. name

b)

B. placeholder

c)

C. autocomplete

d)

D. required

46.

Which two outcomes will this code fragment accomplish? (Each correct answer presents a complete solution. Choose two.)

a)

A. On pre-HTML5 browsers, the happy.wav file will not play, and instead Hello World will be displayed.

b)

B. On an HTML5 browser that supports .wav files, the happy.wav file will be played and Hello World will be hidden.

c)

C. On an HTML5 browser that supports .wav files, the happy.wav file will be played and Hello World will be displayed.

d)

D. on pre-HTMLS browsers, the happy.wav file will play and Hello World will be hidden.

47.

Which three technologies does HTML5 encompass? (Choose three.)

a)

A. CSS

b)

B. ASP.NET

c)

C. C#

d)

D. JavaScript

e)

E. HTML

48.

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)

A. The input areas overlap with other input areas.

b)

B. The touch screen is not initialized.

c)

C. The input areas are using event handlers to detect input.

d)

D. The defined input areas are not large enough.

49.

An HTML5 application can run without an Internet connection if:

a)

A. the application is converted to an executable.

b)

B. the .NET Framework is installed on the client computer.

c)

C. the application specifies the use of a client-side SQL database.

d)

D. the application specifies the use of an ApplicationCache interface.

50.

On a Windows touch device, which gesture serves the same purpose as a right-click of the mouse?

a)

A. swipe

b)

B. pinch

c)

C. tap

d)

D. hold

51.

Which three components define the URL used for localStorage data in HTML5? (Choose three.)

a)

A. scheme

b)

B. user credentials

c)

C. hostname

d)

D. unique port

e)

E. query

52.

Which two code segments declare JavaScript functions? (Choose two.)

a)

A. varfunct= (a);

b)

B. function Foo(a){ "¦ }

c)

C. var a=new Foo();

d)

D. Foo=function(a){ ...}

53.

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?

a)

A. Use the createTextNode method.

b)

B. Use the appendChild method.

c)

C. Set the new text value with the setAttribute method.

d)

D. Use the firstChild property and set the new text value with the nodeValue property.

54.

You create an instance named "location" of a geolocation object.

Which code fragment will initiate periodic updates of a device's geographic location?

a)

A. location = navigator.geolocation;

b)

B. location.watchPosition(showLocation) ;

c)

C. location.getCurrentPosition(showLocation);

d)

D. location.clearNatch(watchid);

55.

You need to use JavaScript to access the "section1" element in the following code fragment:

<div id='section1'>

Which method should you use?

a)

A. getElementsByTagName

b)

B. getElementById

c)

C. getElementsByName

d)

D. getElementsByClassName

56.

Which three properties can be used with the TouchEvent object in the Safari touch API? (Choose three.)

a)

A. offsetTop

b)

B. clientHeight

c)

C. scale

d)

D. touches

e)

E. rotation

57.

Which three statements describe cookies? (Choose three.)

a)

A. They can be created, read, and erased using the document.cookie property.

b)

B. They are limited in size to 5 MB.

c)

C. They are deleted automatically when the session ends.

d)

D. They can be used only by pages on the domain where they were set.

e)

E. They contain the data in the form of a name=value pair.

58.

Which two terms represent interfaces in the File API? (Choose two.)

a)

A. Font

b)

B. Blob

c)

C. Keygen

d)

D. FileList

59.

Which two semantic tags are used to define layouts in HTML5? (Choose two.)

a)

A. <footer>

b)

B. <head>

c)

C. <progress:

d)

D. <section>

60.

Which two HTML5 tags format text content only? (Choose two.)

a)

A. <map>

b)

B. <strong>

c)

C. <canvas>

d)

D. <em>

61.

In HTML5, the autofocus attribute:

a)

A. defines the cursor location when a form is first accessed.

b)

B. controls the movement between fields in a form.

c)

C. adds a default value to the field in a form.

d)

D. enables one field and disables all others.

62.

Which two tags are used with the HTML5 TABLE element? (Choose two.)

a)

A. <body>

b)

B. <tfoot>

c)

C. <td>

d)

D. <head>

63.

Which code shows the correct way to nest tags in HTML5?

a)

A. Option A

b)

B. Option B

c)

C. Option C

d)

D. Option D

64.

Which JavaScript method is used to draw a circle on a canvas?

a)

A. ellipse

b)

B. circle

c)

C. bezierCurveTo

d)

D. arc

65.

Which code fragment will display an image file while the video is downloading?

a)

A. Option A

b)

B. Option B

c)

C. Option C

d)

D. Option D

66.

Which term describes the canvas API?

a)

A. xml-based

b)

B. vector-based

c)

C. retained-mode

d)

D. immediate-mode

67.

Which three generic font family names are valid values of the font-family property in CSS? (Choose three.)

a)

A. cursive

b)

B. system

c)

C. serif

d)

D. fixed

e)

E. fantasy