Microsoft 70-480 Programming in HTML5 with JavaScript and CSS3 Exam Practice Test

Page: 1 / 14
Total 292 questions
Question 1

Which CSS3 code fragment will style only the external links in an HTML document?



Answer : D


Question 2

You have the following CSS markup that renders a red rectangle on a webpage.

How large will the red rectangle appear when it renders on the page?



Answer : A

References:

https://www.w3schools.com/CSSref/css3_pr_box-sizing.asp


Question 3

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?



Answer : C


Question 4

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?



Answer : A

GlobalEventHandlers.onerror

An event handler for runtime script errors.

Syntax

window.onerror = funcRef;


Question 5

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?



Answer : A

CSS Syntax

text-transform: none|capitalize|uppercase|lowercase|initial|inherit;

Example

Transform text in different elements:

h1 {text-transform:uppercase;}

h2 {text-transform:capitalize;}

p {text-transform:lowercase;}


http://www.w3schools.com/cssref/pr_text_text-transform.asp

Question 6

You are troubleshooting a web page that includes the following code. (Line numbers are included for reference only.)

What is displayed in the alert from line 11?



Answer : C

* The event handler here normalizes event object (passed as a first argument) and invokes handleCellClick in a proper context (i.e. referring to an element that was attached event listener to). The element is the button elButton.

* addEventListener

Syntax: element.addEventListener(event, function, useCapture)


Question 7

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?



Answer : D

D is the most correct.


http://www.w3.org/TR/css3-text/#text-shadow

Note:

All options are incorrect nearest correct answers are B or D.

#obj {text-shadow: <x-offset> <y-offset> <blur-radius> <color>; }

<x-offset> +n right -n left

<y-offset> +n bottom -n top

1 inch below means <y-ffset> is 1in or 72 pt

Hence actually answer must be

0px, 1in, 5px

or

0px, 72pt, 5px

Page:    1 / 14   
Total 292 questions