Q1. You are developing a web form that includes the following code.
When a user selects the check box, an input text box must be added to the page dynamically.
You need to ensure that the text box is added.
Which function should you use?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: B
Q2. You are troubleshooting a web page that includes the following code segment.
You need to evaluate the value of the variable x.
What will be displayed in the user interface?
A. 0
B. 1
C. 2
D. An error
Answer: A
Q3. You are creating a class named Sedan that must inherit from the Car class. The Sedan class must modify the inherited fourDoor () method. The Car class is defined as follows.
Future instances of Sedan must be created with the overridden method.
You need to write the code to implement the Sedan class.
Which two code segments should you use? (Each correct answer presents part of the solution. Choose two.)
A. Option A
B. Option B
C. Option C
D. Option D
Answer: BC
Q4. You are creating a JavaScript object that represents a customer.
You need to extend the Customer object by adding the GetCommission() method.
You need to ensure that all future instances of the Customer object implement the GetCommission() method.
Which code segment should you use?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: D
Q5. You are developing a customer web form that includes the following HTML.
<input id="txtValue" type="text" />
A customer must enter a valid age in the text box prior to submitting the form.
You need to add validation to the control.
Which code segment should you use?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: D
Q6. You develop an HTML5 chat application.
You need to provide real-time updates to the messages that users post in the chat application.
What should you do?
A. Use get o to obtain data updates.
B. Use a RESTful web service.
C. Use WebSockets.
D. Use ajaxo to obtain data updates.
Answer: C
Q7. You are developing a web application by using HTML5.
You have the following requirements. . The color of a menu item must change when a user hovers over the item. . The color of the menu item must change back to its original color after five seconds. You need to ensure that the animation is applied to all menu items.
Which CSS3 code should you use?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: C
Q8. You are developing a web page. You create a grid layout by using the following CSS segment.
You have the following requirements:
. You must place content in the first column of the second row.
. The content must span two columns.
You need to ensure that the style of the grid meets the requirements.
Which CSS segment should you use?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: A
Q9. 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
Q10. You are developing a customer web form that includes the following HTML.
<input id="txtValue"/>
You need to change the HTML markup so that customers can enter only a valid three-letter country code.
Which HTML should you use?
A. <input id="txtValue" type="country"/>
B. <input id="txtValue" type="text" required="xxx"/>
C. <input id="txtVa!ue" type="text" pattern-" [A-Za-z] {3} "/>
D. <input id="txtValuen type="code" pattern"="country"/>
Answer: C
Q11. You are modifying a website. The body of the page will be divided into two sections: . A content section will contain blog posts and comments. . An area on the right-hand side will contain advertisements. The page is defined by the following HTML.
The site must conform to HTML5 standards and must use HTML5 semantic tags. You need to ensure that the advertisements are on the rightmost section of the page. Which tag should you use?
A. <aside>
B. <div>
C. <article>
D. <footer>
Answer: A
Q12. You are styling a box object on a page by using CSS3. You need to set the transparency of the object to 50%. Which two CSS3 styles 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: BC
Q13. You have a webpage that includes the following markup and code:
You need to troubleshoot the code by clicking the Submit button.
Which value will be displayed?
A. 10
B. 20
C. Undefined
D. Runtime error
Answer: A
Q14. 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
Q15. 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