Q1. Which two touch gestures require a multi-touch device? (Choose two.)
A. hold
B. tap
C. pinch
D. spread
Answer: B,C
Q2. When you are using the GeoLocation API, which two arguments does the getCurrentPosition function utilize? (Choose two.)
A. success callback
B. MAC address
C. browser type
D. ip address
E. failure callback
Answer: D,E
Explanation: The getCurrentPosition() method returns an object if it is successful. The latitude, longitude and accuracy properties are always returned.The second parameter of the getCurrentPosition() method is used to handle errors. It specifies a function to run if it fails to get the user's location.
Note:
* The HTML5 Geolocation API is used to get the geographical position of a user.
* The getCurrentPosition() method returns an object if it is successful. The latitude, longitude and accuracy properties are always returned.
Q3. Which three event attributes are used with the CAPTION element in HTML5? (Choose three.)
A. onmouseover
B. ondblclick
C. onkeydown
D. onconnect
E. onabort
Answer: A,B,C
Explanation: A: onmouseover
The cursor moved over the object (i.e. user hovers the mouse over the object).
B: ondblclick
Invoked when the user clicked twice on the object.
C: onkeydown
Invoked when a key was pressed over an element.
Q4. 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. Option A
B. Option B
C. Option C
D. Option D
Answer: B,D
Explanation:
Note:
* In JavaScript this always refers to the “owner” of the function we're executing, or rather, to the object that a function is a method of.
* If you assign a value to variable that has not yet been declared, the variable will automatically be declared as a GLOBAL variable.
This statement:
carname="Volvo";
Will declare the variable carname as a global variable , even if it is executed inside a
function.
Q5. What does "V" stand for in the file type SVG?
A. Video
B. Vertical
C. Vector
D. Variable
Answer: C
Q6. 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
Answer: A,C,D
Explanation: localStorage is also the same as globalStorage[location.hostname], with the exception of being scoped to an HTML5 origin (scheme + hostname + non-standard port) and localStorage being an instance of Storage
* HTML5 local storage saves data in string form as key-value pairs. If the data you wish to save is not string data, you are responsible for conversion to and from string when using LocalStorage.
Q7. 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;
Answer: C
Q8. Which attribute prefills a default value for an input element in HTML5?
A. name
B. placeholder
C. autocomplete
D. required
Answer: B
Q9. 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. Option A
B. Option B
C. Option C
D. Option D
Answer: A
Q10. Which two tags are used with the HTML5 TABLE element? (Choose two.)
A. <body>
B. <tfoot>
C. <td>
D. <head>
Answer: B,C
Explanation: An HTML table consists of the <table> element and one or more <tr>, <th>, and <td> elements.
The <tr> element defines a table row, the <th> element defines a table header, and the <td> element defines a table cell.
A more complex HTML table may also include <caption>, <col>, <colgroup>, <thead>, <tfoot>, and <tbody> elements.