Verified 70-480 Guidance 2021
Accurate of 70-480 pdf exam materials and testing bible for Microsoft certification for candidates, Real Success Guaranteed with Updated 70-480 pdf dumps vce Materials. 100% PASS Programming in HTML5 with JavaScript and CSS3 exam Today!
Microsoft 70-480 Free Dumps Questions Online, Read and Test Now.
NEW QUESTION 1
You are creating a web page that contains a canvas with text.
The page contains the following JavaScript code. (Line numbers are included for reference only.)
The text on the canvas must rotate 90 degrees when a user clicks a button on the page. You need to ensure that the text rotates when the user clicks the button.
Which line of code should you add at line 03?
- A. context.transform(90);
- B. context.content.getRotation(90);
- C. context.rotate(90);
- D. context.content.rotate (90);
Answer: C
Explanation:
The rotate() method rotates the current drawing. Example
Rotate the rectangle 20 degrees: JavaScript:
var c=document.getElementById("myCanvas"); var ctx=c.getContext("2d"); ctx.rotate(20*Math.PI/180); ctx.fillRect(50,20,100,50);
Reference: HTML canvas rotate() Method
NEW QUESTION 2
HOTSPOT
You are developing a web page that will be accessed from various types of devices. You have the following requirements:
The appropriate display resolution must be selected dynamically based on the device connecting to
the page.
Mobile devices with a maximum width of 480 pixels must be able to use the page. You need to ensure that the page displays correctly on any device.
How should you build the code? (To answer, select the appropriate options from the drop-down lists in the answer area.)

- A. Mastered
- B. Not Mastered
Answer: A
Explanation:
* The @media rule is used to define different style rules for different media types/devices. CSS Syntax
@media not|only mediatype and (media feature) { CSS-Code;
}
* Media type: Screen
Used for computer screens. Incorrect:
Not size: there is no media type size.
Reference: CSS3 @media Rule; CSS Media Types
NEW QUESTION 3
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").css ( "background-color", "#f2f2f2");
- C. $ ("article:first-of-type") .css("background-color", "#f2f2f2");
- D. $ ("section:first-of-type").css("background-color", "#f2f2f2");
Answer: C
Explanation:
The :first-of-type selector matches every element that is the first child, of a particular type, of its parent.
Reference: CSS3 :first-of-type Selector
NEW QUESTION 4
You are developing an HTML5 page that includes several paragraph elements. You have the following requirements:
Add a drop shadow that is one inch below the text in the paragraph Set the radius of the drop shadow to five pixels
You need to style the paragraphs to meet the requirements. Which CSS style should you use?
- A. Text-shadow: 72pt 0pt 5pt
- B. Text-shadow: 5px lin 0px;
- C. Text-shadow: 72pt 0em 5px;
- D. Text-shadow: 100px 0px 5px;
Answer: B
Explanation:
We set the second argument (vertical) to one inch (1in). Note
Syntax
text-shadow: h-shadow v-shadow blur color;
Note: The text-shadow property attaches one or more shadows to text. The property is a comma- separated list of shadows, each specified by 2 or 3 length values and an optional color. Omitted lengths are 0.
* h-shadow
Required. The position of the horizontal shadow. Negative values are allowed
* v-shadow
Required. The position of the vertical shadow. Negative values are allowed
* blur
Optional. The blur distance
* color
Optional. The color of the shadow.
NEW QUESTION 5
DRAG DROP
You need to write a jQuery function to consume a file named Orders.xml. You write the following code.
How should you complete the code? To answer, drag the appropriate code elements to the correct targets in the answer are a. Each code element may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
- A. Mastered
- B. Not Mastered
Answer: A
Explanation:
References:
https://github.com/processing/p5.js/wiki/Loading-external-files:-AJAX,-XML,-JSON
NEW QUESTION 6
You are developing an application in HTML5. You have the following code.
You need to add an additional property to the function definition. Which line of code should you use?
- A. NewOrder [“newProperty”] = “newProperty”
- B. NewOrde
- C. prototyp
- D. newProperty = “newProperty”
- E. this.NewOrde
- F. newProperty = “newProperty”
- G. NewOrde
- H. newProperty = “newProperty”
Answer: C
Explanation:
References: http://www.w3schools.com/js/js_object_prototypes.asp
NEW QUESTION 7
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: B
Explanation:
The <article> tag specifies independent, self-contained content.
An article should make sense on its own and it should be possible to distribute it independently from the rest of the site.
Potential sources for the <article> element: Forum post
Blog post News story Comment
Reference: HTML <article> Tag http://www.w3schools.com/tags/tag_article.asp http://www.w3schools.com/html/html5_new_elements.asp
NEW QUESTION 8
DRAG DROP
You create a JavaScript object named processor as shown in the following code.
You need to ensure that when the code executes, a dialog box displays the alert ‘Process done’.
How should you complete the code? To answer, drag the appropriate code elements to the correct targets. each code element may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.
- A. Mastered
- B. Not Mastered
Answer: A
Explanation:
Target 1: bind
Target 2: displayProcessDone
NEW QUESTION 9
DRAG DROP
You are developing an airline reservation website by using HTML5 and JavaScript. A page on the site allows users to enter departure and destination airport information and to search for tickets.
You have the following requirements:
Users must be able to save information in the application about their favorite destination airport.
The airport information must be displayed in the destination text box whenever the user returns to the page.
You need to develop the site to meet the requirements.
Which line or lines of code should you use? (To answer, drag the appropriate command or commands from the list of commands to the correct location or locations in the work are
- A. Mastered
- B. Not Mastered
Answer: A
Explanation:
* retrieve localStorage.destination
* store localStorage.destination
NEW QUESTION 10
DRAG DROP
You have a page that uses HTML5 and CSS3. The page contains the following markup.
What are the font color and the background color of the links when the page renders? To answer, drag the appropriate colors to the correct locations. Each color may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.
- A. Mastered
- B. Not Mastered
Answer: A
Explanation:
Link font color: Explanation:
Yellow
Link background color: Fuchsia References:
NEW QUESTION 11
You are developing an HTML5 web form to collect feedback information from site visitors. The web form must display an INPUT element that meets the following requirements: Allow numeric values between 1 and 10.
Default to the value of 5.
Display as a slider control on the page.
You need to add the INPUT element to the form. Which HTML element should you add?
- A. Rating (Between 1 and 10): <input type="number" name="rating" min ="1" max-"10">
- B. Rating (Between 1 and 10): <input type="number" name="rating" min="1" max="10" default="5">
- C. Rating (Between 1 and 10): <input type="range" name="rating" min="1" max="10" default"="5">
- D. Rating (Between 1 and 10): <input type="range" name="rating" min="10" max="10" value="5">
Answer: C
Explanation:
input type="range"
The <input type="range"> is used for input fields that should contain a value within a range. Depending on browser support, the input field can be displayed as a slider control.
Example
<form>
<input type="range" name="points" min="0" max="10">
</form>
NEW QUESTION 12
HOTSPOT
You develop an HTML5 webpage that contains the following markup and code:
You have the following requirements:
Display a message if users select the first OPTION element, and then submit the form.
Do not display an alert message if users select any other OPTION element, and then submit the form.
You need to implement the madeSelection() function.
How should you complete the relevant code? (To answer, select the appropriate code segment from each drop-down list in the answer area.)

- A. Mastered
- B. Not Mastered
Answer: A
Explanation:
* The <select> element is used to create a drop-down list.
The <option> tags inside the <select> element define the available options in the list.
* option.value text
Specifies the value to be sent to a server Reference: HTML <option> Tag
NEW QUESTION 13
You troubleshoot a webpage that contains the following HTML markup: (Line numbers are included for reference only.)
The webpage also contains the following JavaScript function named someEvent() that is declared in the HEAD section of the HTML:
Function someEvent() { Alert('someEvent fired!');
}
The JavaScript function named someEvent() must run only when the user clicks the DIV element, not the INPUT elements.
You need to modify the webpage to invoke the JavaScript function named someEvent(). What should you do? (Each correct answer presents a complete solution. Choose two.)
- A. Option A
- B. Option B
- C. Option C
- D. Option D
Answer: AB
NEW QUESTION 14
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
Explanation:
* The outermost assignment, counter = 10; will decide the output that is displayed.
* Local variables have local scope: They can only be accessed within the function. Example
// code here can not use carName function myFunction() {
var carName = "Volvo";
// code here can use carName
}
* A variable declared outside a function, becomes GLOBAL.
A global variable has global scope: All scripts and functions on a web page can access it.
Example
var carName = " Volvo";
// code here can use carName function myFunction() {
// code here can use carName
}
Reference: JavaScript Scope
NEW QUESTION 15
DRAG DROP
You create an HTML5 webpage. You have the following HTML markup:
You also have the following JavaScript code segment:
var jsonFruit = { "apples" : "12", "bananas" : "8", "watermelon" : "3" }
You need to add additional rows to the fruitTable element by processing the jsonFruit values in the order listed.
Which three actions should you perform in sequence? (Develop the solution by selecting the required code segments and arranging them in the correct order.)
- A. Mastered
- B. Not Mastered
Answer: A
Explanation: 
NEW QUESTION 16
You develop an HTML5 webpage. You have the following HTML markup:
You need to change the background color for all of the elements whose name attribute ends with the
word name.
Which code segment should you add to the webpage?
- A. $ ('input [name!="name"]’) .css ({ 'background-color' : ' #E0ECF8'}) ;
- B. ${'input [name="~name"] ') .css ({ 'background-color' : ' #E0ECF8' }) ;
- C. ${'input[name="*name"]').css({'background=color': #E0ECF8'});
- D. $( 'input [name="$name"] ') .css ({ 'background-color' : '#E0ECF8'});
Answer: C
Explanation:
The string pattern "*name" matches all strings that ends with name.
NEW QUESTION 17
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? (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 intensive video compression
- D. A function that stores large amounts of data to local storage
Answer: BC
NEW QUESTION 18
HOTSPOT
You are implementing an HTML page that uses a custom sans-serif font. The CSS statement for the page is as follows.
Some users report that text is displayed in the default font for the browser.
You need to modify the CSS statement to ensure that the content is displayed with the custom font. What should you do? (To answer, select the appropriate options from the drop-down lists in the answer area.)

- A. Mastered
- B. Not Mastered
Answer: A
Explanation:
Using The Font You Want
In the CSS3 @font-face rule you must first define a name for the font (e.g. myFirstFont), and then
point to the font file.
To use the font for an HTML element, refer to the name of the font (myFirstFont) through the font- family property:
Example
@font-face {
font-family: myFirstFont;
src: url(sansation_light.woff);
}
div {
font-family: myFirstFont;
}
Note:
* CSS3 Web Fonts - The @font-face Rule
Web fonts allow Web designers to use fonts that are not installed on the user's computer.
When you have found/bought the font you wish to use, just include the font file on your web server, and it will be automatically downloaded to the user when needed.
Your "own" fonts are defined within the CSS3 @font-face rule.
* TrueType Fonts (TTF)
TrueType is a font standard developed in the late 1980s, by Apple and Microsoft. TrueType is the most common font format for both the Mac OS and Microsoft Windows operating systems. Reference: CSS3 Web Fonts
NEW QUESTION 19
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
Explanation:
GlobalEventHandlers.onerror
An event handler for runtime script errors.
Syntax
window.onerror = funcRef;
Reference: GlobalEventHandlers.onerror
NEW QUESTION 20
You have the following HTML markup.
For all of the fields that have names ending with the letter x, you need to set the value to value1. Which code line should you use?
- A. Option A
- B. Option B
- C. Option C
- D. Option D
Answer: C
NEW QUESTION 21
You are developing an HTML5 web application that provides a discussion forum for users. When a user registers to access the application, the user enters an email address.
Users can enter data that can result in cross-site scripting (XSS) attacks. You need to ensure that email input is as secure as possible.
Which two techniques should you use? (Each correct answer presents a complete solution. Choose two.)
- A. Remove all nonalphanumeric characters before submitting data.
- B. Use the email tag in forms where the email address is entered.
- C. Display all email addresses inside of an HTML5 ADDRESS element.
- D. Use jQuery validation with a regular expression to ensure that email addresses are valid.
- E. Ensure that all form data is encrypted when it is submitted.
Answer: BD
Explanation:
B: The <input type="email"> is used for input fields that should contain an e-mail address. Depending on browser support, the e-mail address can be automatically validated when submitted.
Some smartphones recognize the email type, and adds ".com" to the keyboard to match email input. D: JQuery can be used to validate email addresses.
Reference: HTML Input Types; Email Validation Using jQuery Codes
NEW QUESTION 22
You are developing an application that consumes an external web service. The web service 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.
The application has two JavaScript variables named newStockRate and stockRate to store the latest and previous stock rates, respectively.
Users must be able to compare the old stock rate with the new stock rate.
You need to ensure that newStockRate and stockRate retain their values for comparison. Which code segment should you use?



- A. Option A
- B. Option B
- C. Option C
- D. Option D
Answer: C
NEW QUESTION 23
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
Explanation:
HTML <input> pattern Attribute
The pattern attribute specifies a regular expression that the <input> element's value is checked against.
Example
An HTML form with an input field that can contain only three letters (no numbers or special characters):
<form action="demo_form.asp">
Country code: <input type="text" name="country_code" pattern="[A-Za-z]{3}" title="Three letter country code">
<input type="submit">
</form>
Reference: HTML <input> pattern Attribute http://www.w3schools.com/tags/att_input_pattern.asp
NEW QUESTION 24
You are creating a page that contains detailed employee information for a company portal. The page uses a jQuery library. The page contains a hidden button named btnEdit that is defined by the following code.
<button id="btnEdit" style="display: none;>Edit</button> The button is not displayed by default.
The button must be displayed only if the user is logged on.
You need to add code to the document.ready() function to meet the requirements for the button. Which line of code should you use?
- A. $ (‘#btnEdit’).appear ();
- B. $ (‘#btnEdit’).visible = true;
- C. $ (‘#btnEdit’).show();
- D. $ (‘#btnEdit’).Visible();
Answer: C
Explanation:
With jQuery, you can hide and show HTML elements with the hide() and show() methods: Example
$("#hide").click(function(){
$("p").hide();
});
$("#show").click(function(){
$("p").show();
});
Reference: jQuery Effects - Hide and Show
NEW QUESTION 25
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
Explanation:
The placeholder attribute specifies a short hint that describes the expected value of an input field
(e.g. a sample value or a short description of the expected format).
The short hint is displayed in the input field before the user enters a value.
The placeholder attribute works with the following input types: text, search, url, tel, email, and password.
Reference: HTML <input> placeholder Attribute
NEW QUESTION 26
HOTSPOT
You are creating a web worker for an HTML5 application.
The following tasks must be performed from within the web worker: Register an event listener for the web worker
Start and stop the web worker
You need to define a function that performs the required tasks.
Which code segment should you use? (To answer, select the appropriate option from the drop-down list in the answer area.)

- A. Mastered
- B. Not Mastered
Answer: A
Explanation:
* addEventListener
The addEventListener() method attaches an event handler to the specified element.
In context of a worker, both self and this refer to the global scope. The worker can either add an event listener for the message event, or it can define the onmessage handler to listen for any messages sent by the parent thread.
* postmessage
Pass a message to the worker.
* close()
Terminating Workers
Workers are resource-intensive; they are OS-level threads. Therefore, you do no want to create a large number of worker threads, and you should terminate the web worker after it completes its work. Workers can terminate themselves, like this:
self.close();
Reference: HTML DOM addEventListener() Method; The Basics of Web Workers
NEW QUESTION 27
......
100% Valid and Newest Version 70-480 Questions & Answers shared by Dumpscollection, Get Full Dumps HERE: http://www.dumpscollection.net/dumps/70-480/ (New 322 Q&As)