70-480 Premium Bundle

70-480 Premium Bundle

Programming in HTML5 with JavaScript and CSS3 Certification Exam

4.5 
(18015 ratings)
0 QuestionsPractice Tests
0 PDFPrint version
November 23, 2024Last update

Microsoft 70-480 Free Practice Questions

Q1. You are developing a web page by using HTML5 and C5S3. The page includes a <div> tag with the ID set to validate. 

When the page is rendered, the contents of the <div> tag appear on a line separate from the content above and below it. The rendered page resembles the following graphic. 

You need to ensure that the page is rendered to meet the requirement. 

Which line of code should you use? 

A. document.getElementById("validate").style.display = "inline"; 

B. document.getElementById("validate").style.margin = "0"; 

C. document.getElementById("validate").style.padding = "0"; 

D. document.getElementSyId("validate").style.display = "block"; 

Answer:

Q2. You develop an application to host user-generated HTML and JavaScript content. 

A common error handler in your application must process all unhandled errors. 

You need to implement global error handling for the application. 

Which code segment should you use? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer: A

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

Q4. You are developing a web page that includes the following HTML. <span id="myTextSpan" class="myStyle">Hello, World!</Span> You need to use inline CSS styling to format the text with Arial font. Which code segment should you use? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer: B

Q5. You are developing a page that includes text and an illustration. The web page resembles the following image. 

You have the following requirements: 

The illustration must be in the center of the page. 

The text must flow around the left, right, top, and bottom of the illustration. 

You need to ensure that the layout of the web page meets the requirements. 

Which line of code should you use? 

A. -ms-wrap-side: both; 

B. -ms-wrap-side: clear; 

C. -ms-wrap-side: maximum; 

D. -ms-wrap-side: auto; 

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

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

Q9. You are developing a web page that enables customers to upload documents to a web server. The page includes an HTML5 PROGRESS element named progressBar that displays information about the status of the upload. 

The page includes the following code. (Line numbers are included for reference only.) 

An event handler must be attached to the request object to update the PROGRESS element on the page. 

You need to ensure that the status of the upload is displayed in the progress bar. 

Which line of code should you insert at line 03? 

A. xhr.upload.onloadeddata = 

B. xhr.upload.onplaying = 

C. xhr.upload.onseeking = 

D. xhr.upload.onprogress = 

Answer:

Q10. You are creating an HTML5 application that allows users to play video on a page by using the VIDEO element. 

You need to enable the user to start, stop, and pause the video. 

Which line of code should you add to the page? 

A. <video id= "myVideo" height="320" width="400" src="myVideo.vtt" contextmenu="pauseplay"> </video> 

B. <video id="myVideon heigh"="320" width="400" src="myVideo.vtt" controls> </video> 

C. <video _d="myVideon height="320" width="400" src="myVideo.vtt" autoplay> </video> 

D. <video id="myVideo" height="320" width="400" src="myVideo.vtt" contextinenu="Startstopn> </video> 

Answer: B

Q11. You are developing an application that consumes a Windows Communication Foundation (WCF) service. 

The application interacts with the service by using the following code. (Line numbers are included for reference only.) 

You need to authenticate to the WCF service. 

What should you do? 

A. At line 11, add the following lines of code. ,username: yourusername ,password: yourpassword 

B. At line 11, add the following line of code. ,credentials: prompt 

C. At line 06, replace the code with the following line of code. url: "http://contoso.com/Service.svc/GetCountry? Username=username&password=psssword", 

D. At line 11, add the following line of code. The username and password will be stored in an XML file. ,credentials: credentials.xml 

Answer:

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

Q13. You are developing an HTML page that includes the following code. 

<h1 id="header">A Static Page</hl> 

You need to modify the content of the HI element dynamically by using JavaScript. 

Which code segment should you use? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer: D

Q14. 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

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

START 70-480 EXAM