Microsoft 70-480 Online Practice
Questions and Exam Preparation
70-480 Exam Details
Exam Code
:70-480
Exam Name
:Programming in HTML5 with JavaScript and CSS3
Certification
:Microsoft Certifications
Vendor
:Microsoft
Total Questions
:332 Q&As
Last Updated
:Dec 07, 2021
Microsoft 70-480 Online Questions &
Answers
Question 181:
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
Definition and Usage
The onblur event occurs when an object loses focus.
Example
Execute a JavaScript when a user leaves an input field:
Reference: onblur Event
http://www.w3schools.com/jsref/event_onblur.asp
Question 182:
DRAG DROP
You are creating a function by using JavaScript. The function accepts an object as the parameter and returns a string that identifies the data type of the object. You have the following requirements: The function must return "Number" if the object is a number The function must return "String" if the object is a string
The function must return "Unknown" if the object is neither a number nor a string You need to implement the function to meet the requirements. How should you build the code segment? (To answer, drag the appropriate word to the correct location in the code segment. Each word 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.)
Select and Place:
* Use the switch statement to select one of many blocks of code to be executed.
Syntax
switch(expression) {
case n:
code block
break;
case n:
code block
break;
default:
default code block
}
This is how it works:
The switch expression is evaluated once.
The value of the expression is compared with the values of each case.
If there is a match, the associated block of code is executed.
*
Object.prototype.constructor
Returns a reference to theObject function that created the instance's prototype. Note that the value of this property is a reference to the function itself, not a string containing the function's name. The value is only read-only for primitive values
such as 1, true and "test".
*
Description
All objects inherit a constructor property from their prototype:
var o = {};
o.constructor === Object; // true
var a = [];
a.constructor === Array; // true
var n = new Number(3);
n.constructor === Number; // true
*
The constructor propertyis created together with the function as a single property of func.prototype.
You are developing an application by using JavaScript.
You must write a function named Add that returns the sum of the variables named v1, v2, v3, v4. The addValues function must call the Add function and use the appropriate owner object.
You need to complete the sum function.
How should you complete the relevant code? (To answer, drag the appropriate code segment or segments to the correct location or locations in the answer area. Use only code segments that apply.)
Select and Place:
* What is the difference between call and apply?
apply lets you invoke the function with arguments as an array; call requires the parameters be listed explicitly.
You are developing an HTML5 page that has an element with an ID of logo. The page includes the following HTML.
Logo:
You need to move the logo element lower on the page by five pixels.
Which lines of code should you use? (Each correct answer presents part of the solution. Choose two.)
A. document.getElementById("logo") .style.position = "relative"; B. document.getElementByld("logo").Style.top = "5px"; C. document.getElementById("logo").style.top = "-5px"; D. document.getElementById("logo").style.position = "absolute";
A. document.getElementById("logo") .style.position = "relative"; B. document.getElementByld("logo").Style.top = "5px";
*
style.position = "relative";
The element is positioned relative to its normal position, so "left:20" adds 20 pixels to the element's LEFT position.
*
For relatively positioned elements, the top property sets the top edge of an element to a unit above/below its normal position.
Example:
Set the top edge of the image to 5px below the top edge of its normal position:
img {
position: relative;
top: 5px;
}
Reference: CSS position Property; CSS top Property
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
C. SVG
*
SVG stands for Scalable Vector Graphics SVG is used to define graphics for the Web SVG is a W3C recommendation
*
The HTML
SVG has several methods for drawing paths, boxes, circles, text, and graphic images.
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
D. Option D
*
Input Type: password
defines a password field.
The characters in a password field are masked (shown as asterisks or circles).
*
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.
You are developing an HTML5 web application for displaying encyclopedia entries.
Each encyclopedia entry has an associated image that is referred to in the entry.
You need to display the image by using the correct semantic markup.
What should you do? (To answer, select the appropriate options from the drop-down list in the answer area.)
Hot Area:
You are reviewing the CSS markup for an HTML5 page that displays a news article. The CSS markup for the page is as follows:
Question 188:
You are developing a website that helps users locate theaters in their area from a browser. You created a function named findTheaters ().
The function must:
Get the current latitude and longitude of the user's device
Pass the user's location to findTheaters()
The user needs to access the geolocation information from the browser before searching for theaters.
Which code segment should you use?
A. Option A B. Option B C. Option C D. Option D
C. Option C
* The getCurrentPosition method retrieves the current geographic location of the device. The location is expressed as a set of geographic coordinates together with information about heading and speed. The location information is returned in a Position object.
showLocation : This specifies the callback method that retrieves the location information. This method is called asynchronously with an object corresponding to the Position object which stores the returned location information.
ErrorHandler : This optional parameter specifies the callback method that is invoked when an error occurs in processing the asynchronous call. This method is called with the PositionError object that stores the returned error information.
* e example below is a simple Geolocation example returning the latitude and longitude of the user's position:
Example
Example explained:
Check if Geolocation is supported
If supported, run the getCurrentPosition() method. If not, display a message to the user
If the getCurrentPosition() method is successful, it returns a coordinates object to the function specified in the parameter ( showPosition ) The showPosition() function gets the displays the Latitude and Longitude
The example above is a very basic Geolocation script, with no error handling.
The user interface of the webpage must show a gray-lined box that contains the label Enter your information:. Inside the box are two labels and two input boxes. The first input box must be labeled Name:. The second input box must be
labeled Email:. Below the box is a Submit button.
The user interface must look like the following;
You need to create the user interface. Which markup should you use?
A. Option A B. Option B C. Option C D. Option D
B. Option B
* The
Question 190:
HOTSPOT
You create a custom style by using CSS3.
A box with rounded corners must appear around text. The box must match the following illustration:
You need to add the CSS3 markup to your style.
How should you complete the relevant CSS styles? (To answer, select the appropriate option from each drop-down list in the answer area.)
Hot Area:
* box-sizing
The box-sizing property is used to tell the browser what the sizing properties (width and height) should include.
Should they include the border-box or just the content-box which is the default value of the width and height properties.
* border-radius
The border-radius property is a shorthand property for setting the four border-*-radius properties.
Nowadays, the certification exams become more and more important and required by more and more
enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare
for the exam in a short time with less efforts? How to get a ideal result and how to find the
most reliable resources? Here on Vcedump.com, you will find all the answers.
Vcedump.com provide not only Microsoft exam questions,
answers and explanations but also complete assistance on your exam preparation and certification
application. If you are confused on your 70-480 exam preparations
and Microsoft certification application, do not hesitate to visit our
Vcedump.com to find your solutions here.