Q1. You develop an HTML5 application that allows users to upload files from their local computers.
The user interface must remain responsive during the upload.
You need to implement the file upload functionality for the application.
Which two actions should you perform? (Each correct answer presents a complete solution. Choose two.)
A. Use an HTML form with a file type INPUT element that targets a hidden IFRAME element.
B. Use a file type INPUT element, and then use the Web Storage API to upload the file.
C. Use a FormData object and upload the file by using XMLHttpRequest.
D. Register the file protocol by using protocol handler registration API and then upload the file by using XMLHttpRequest.
E. Use the FileSystem API to load the file, and then use the jQuery post method to upload the file to the server.
Answer: BD
Q2. You develop an HTML5 webpage. You have the following HTML markup: (Line numbers are for reference only.)
You need to determine how the webpage will appear when the CSS styles are applied.
Select two.
A. The first row of the table will have a red background.
B. The second row of the table will have a red background.
C. The second cell in the first row of the table will have a blue background.
D. The second cell in the third row of the table will have a blue background.
E. The second cell in the third row of the table will have not have blue background.
Answer: AE
Q3. You are developing a web application that consumes services from a third-party application. A web worker processes the third-party application requests in the background. A page in the application instantiates the web worker process.
You need to establish two-way communications between the web worker process and the page.
Which two actions will achieve this goal? (Each correct answer presents a complete solution. Choose two.)
A. From the web worker, use the onconnect event handler of the main page to capture events.
B. From the main page, use the onmessage event handler of the web worker to capture events.
C. From the web worker, use the onmessage event handler of the main page to capture events.
D. From the main page, use the onconnect event handler of the web worker to capture events.
Answer: BC
Q4. You are developing a blog web page that is being optimized for accessibility. The page includes the following HTML.
The heading tags represent a blog post title, a blog post subtitle, and the author's name.
You need to ensure that the three headings are treated as a unit but retain their individual formatting.
Which tags should you use to wrap the H1, H2, and H3 elements?
A. <group> </group>
B. <header> </header>
C. <hgroup> </hgroup>
D. <headings> </headings>
Answer: C
Q5. You are developing an HTML5 web application and are styling text.
You need to use the text-transform CSS property.
Which value is valid for the text-transform property?
A. Italic
B. Red
C. Capitalize
D. Line-through
Answer: C
Q6. You are developing a web page that includes the following HTML.
<span id = "myTextSpan" class = "redText"> Hello There! </span>
The font color of text inside the span must be red.
You need to develop the web page to meet the requirement.
Which two CSS segments will achieve the goal? (Each correct answer presents a complete solution. Choose two.)
A. Option A
B. Option B
C. Option C
D. Option D
Answer: AC
Q7. You are building a web page for a newspaper publisher.
. You have the following requirements:
. The web page should split the content into columns that are at least 100 pixels wide.
. The number of columns displayed must be set by the browser.
You need to implement the correct CSS properties.
Which line of code should you use?
A. <div id="outer" style="width: 100px; column-fill: balance;">...</div>
B. <div id="outer" style="width: 100px; column-gap: 10px;">...</div>
C. <div id="outer" style="column-width: 100px; ">. . .</div>
D. <div id="outer" style="width: 100px; columns: 100px 3">...</div>
Answer: C
Q8. 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?
A. Using the keyup event, add an anonymous function that returns true when a specific character keycode value is determined.
B. Using the change event, add an anonymous function that returns true when a specific character keycode value is determined.
C. Using the keydown event, add an anonymous function that returns false when a specific character keycode value is determined.
D. Using the change event, add an anonymous function that returns false when a specific character keycode value is determined.
Answer: B
Q9. You are troubleshooting an application. Users report that the UI is slow to respond.
You need to improve UI responsiveness by moving application tasks to web workers.
Which two tasks can you move to achieve this goal? (Each correct answer presents a complete solution. Choose two.)
A. A function that loops through the Document Object Model to update the style of page elements
B. A long-running calculation that requires looping through an array
C. A function that performs graphic-intensive animation
D. A function that stores large amounts of data to local storage
Answer: BC