Q1. You develop an HTML5 webpage. You have the following HTML markup:
You need to add a background color to the first article in each section.
Which code segment should you add to the webpage?
A. $ ("section article:first-child").css("background-color", "#f2f2f2");
B. $ ("section:first-child").ess ( "background-color", "#f2f2f2");
C. $ ("article:first-of-type") .css("background-color", "#f2f2f2");
D. $ ("section:first-of-type").css("background-color", "#f2f2f2");
Answer: C
Q2. You develop an HTML application that is located at www.adventure-works.com. The application must load JSON data from www.fabrikam.com.
You need to choose an approach for loading the data.
What should you do?
A. Add a crossdomain.xml file to the second server.
B. Configure Cross-Origin Resource Sharing (CORS) on the servers.
C. Load the data in a JavaScript timeout callback.
D. Reference the remote data as an XML resource.
Answer: B
Q3. You are testing the value of the following variable in JavaScript.
var height = "300";
A block of code must execute if the following conditions are true: . The height variable is set to 300 . The height variable is of type string You need to implement the code to run the test.
Which line of code should you use?
A. if (height = = 300)
B. if (height = = "300")
C. if (height ! "300")
D. if (height ! = 300)
Answer: B
Q4. 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
Q5. You are developing an HTML5 web page.
The appearance of the text box must change when a user moves the focus to another element on the page.
You need to develop the page to respond to user action.
Which line of code should you use?
A. <input type="text" onblur="resetStyle(this);" />
B. <input type="text" onfocus="resetStyle(this);" />
C. <input type="text" onreset="resetStyle(this);" />
D. <input type="text" onselect="resetStyle(this);" />
Answer: A
Q6. You develop an HTML5 webpage. You have the following JavaScript code:
You need to handle the click event when a user clicks the show/Dialog button.
Which code segment should you insert at line 02?
A. $ (document).trigger("click", "#showDialog", function (e) {
B. $ (document).on ("#showDialog", "click", function (e) {
C. $(document).toggle("click", "#showDialog", function (e) {
D. $(document).on("click", "#showDialog", function (e) {
Answer: D
Q7. 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
Q8. 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
Q9. 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
Q10. You are developing an HTML5 web application for a surveyor company that displays topographic images.
The application must:
Display the topographic images at different zoom levels without loss of detail Print the topographic images without loss of detail Work from only one source file for each topographic image
You need to ensure that the topographic images display according to the requirements.
Which HTML5 element should you use?
A. SVG
B. CANVAS
C. SAMP
D. AREA
Answer: A
Q11. You are modifying a blog site to improve search engine readability.
You need to group relevant page content together to maximize search engine readability.
Which tag should you use?
A. <tbody>
B. <article>
C. <div>
D. <span>
Answer: B
Q12. 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
Q13. You are developing a customer web form that includes following HTML.
<input id= "textAccountType"/>
You need to develop the form so that customers can enter only a valid account type consisting of two English alphabet characters.
Which code segment should you use?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: B
Q14. You are creating a blog site by using HTML5 and JavaScript. An inline frame enables users to post comments. It is possible for users to inject malicious scripts into their comments.
You need to minimize the ability for malicious scripts to execute on the site.
Which line of code should you use?
A. <iframe sandbox src="frame1.htmlnX/iframe>
B. <iframe seamless="allowscripts" src="frame1.html"<>/iframe>
C. <iframe seamless src="frame1.html"></iframe>
D. <iframe sandbox="allowscripts" src"frame1.html"x/iframe>
Answer: A
Q15. You develop an HTML5 application for a company. Employees must enter a personal identification number (PIN) in an INPUT element named SecurityCode to access their employee records.
The SecurityCode element must meet the following requirements:
Allow up to 6 digits.
Do not display numbers as they are entered.
Display the text Enter PIN Code before the user enters any data.
You need to implement the SecurityCode element.
Which HTML markup should you add to the application?
A. Option A
B. Option B
C. Option C
D. Option D
E. Option E
Answer: D