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

certleader.com

Q1. You develop a webpage with a standard input control by using HTML5. 

The input control must display the text Enter your given name, as shown below: 

When a user selects the input control, the text must disappear. 

You need to create the input control. 

Which input control should you use? 

A. <input name="GivenName" value=" Enter your given name" /> 

B. <input name ="GivenName" default=" Enter your given name" /> 

C. <input name="GivenName" text=" Enter your given name" /> 

D. <input name="GivenName" placeholder=" Enter your given name" /> 

Answer: D

Q2. You develop an HTML5 application that interacts with a REST service. The REST service accepts JSON data. A JavaScript object named form Data contains data that is sent to the REST service. 

You need to convert the JavaScript object named formData into JSON. 

Which code segment should you use? 

A. jQuery.ajax.valueOf(formData); 

B. window.evai(formData); 

C. JSON.stringify (formData); 

D. formData.toString(); 

Answer: C

Q3. 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:

Q4. You implement an application by using HTML5 and JavaScript. You create a webpage that contains the following HTML: 

The application must place a border on only the first UL element that is contained in the DIV element. 

You need to update the webpage. 

What should you do? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer:

Q5. You are developing a customer web form that includes the following HTML. <label id="txtValue"X/label> 

Information from the web form is submitted to a web service. The web service returns the following JSON object. 

"Confirmation": "1234", 

"FirstName": "John" 

You need to display the Confirmation number from the JSON response in the txtValue label field. 

Which JavaScript code segment should you use? 

A. $("#txtValue").val = (JSONObject.Confirmation); 

B. $("#txtValue").val (JSONObject.Confirmation); 

C. $("#txtValue").text = (JSONObject.Confirmation); 

D. $("#txtValue").text (JSONObject.Confirmation); 

Answer:

Q6. 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:

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

Q8. 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:

Q9. 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:

Q10. 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: