70-480 Exam - Programming in HTML5 with JavaScript and CSS3

certleader.com

Q1. You are creating a web form that users will use to enter their personal information. The form includes the following HTML. 

<body>

  <table>

<tr>

  <td>Item</td>

  <td>Input</td>

  <td>Current</td>

</tr>

<tr>

  <td>First Name</td>

<td>

  <input type=”text”/>

</td>

<td></td>

</tr>

<tr>

<td>Last Name</td>

<td>

  <input type=”text”/>

</td>

<td></td>

</tr>

</table>

</body>

You have the following requirements: 

. When a user enters an input box, the cell on the right must turn green. 

. When a user leaves an input box, the cell on the right must turn white. 

You need to create the web form to meet these requirements. Which code segment should you use? 

A. Option A B. Option B 

C. Option C 

D. Option D 

Answer:

Q2. 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. Line-through 

C. Capitalize 

D. 20px 

Answer:

Q3. You create an application that sends information to a web service by using the following code: (Line numbers are included for reference only.) 

When the web service returns a non-zero result code, you must raise an exception that contains the result code. 

You need to implement the code that generates the exception. 

Which line of code should you insert at line 04? 

A. CustomError .prototype = Error.prototype; 

B. CustomError ["ErrorType"] = Error; 

C. CustomError.customError = true; 

D. Error-constructor = CustomError; 

Answer:

Q4. You are developing an application that consumes an external web service that returns the latest stock rate. 

The application has two methods: 

. The getResults() method makes an AJAX web service request 

. The ShowRate() method displays the stock rate from the web service response You need to ensure that the ShowRate() method always displays the latest stock rate. 

Which code segment should you use? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:

Q5. You are developing an HTML5 web application for an architectural company that displays architectural blueprints. 

The application must: 

Display the blueprints at different zoom levels without loss of detail Print the blueprints without loss of detail Work from only one source file per blueprint 

You need to ensure that blueprints display according to the requirements. 

Which HTML5 element should you use? 

A. CANVAS 

B. SAMP 

C. SVG 

D. AREA 

Answer:

Q6. An HTML page contains no embedded JavaScript or CSS code. The body of the page contains only the following line of code. 

<p id="test">test</p> A CSS style sheet must be applied dynamically. The style must visibly change the appearance of the paragraph on the page. 

You need to apply a style the paragraph. 

Which line of code should you use? 

A. document.getElementById("test").style.border = "0"; 

B. document.getElementById("test").style.position = "static"; 

C. document.getElementById ("test").style.padding = "15px"; 

D. document.getElementById("test").style.top = "5px"; 

Answer:

Q7. 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. <nav> 

B. <article> 

C. <span> 

D. <div> 

Answer:

Q8. You develop an HTML5 webpage that contains the following HTML markup: 

Users must receive a message after they click the Submit button if the text entered into the 

favoriteColor text box is fewer than 2 characters or greater than 10 characters. 

You need to implement the testLength() function. 

Which code segment should you use? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer: D

Q9. You are developing a web page that will contain an animated logo. The web page currently has a logo image on a canvas object. 

You need to spin the logo image on the canvas. 

Which method should you use? 

A. context.rotate() 

B. context.spin() 

C. context.translatePosition() 

D. context.setTransform() 

Answer: A

Q10. You are developing a customer web form that includes the following HTML input field. 

<input id="txtValue"/> 

If a customer enters a value in the input field, then it must be a numeric value. 

You need to add validation to the input field. 

Which HTML should you use? 

A. <input id="txtValue" type-"text" pattern="/#" /> 

B. <input id="txtValue" type="number" /> 

C. <input id="txtVa!ue" type="integer" /> 

D. <input id="txtValue" type="text" required="required"/> 

Answer: