+ All Categories
Home > Documents > 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation...

70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation...

Date post: 26-Aug-2018
Category:
Upload: trinhthien
View: 221 times
Download: 0 times
Share this document with a friend
73
70-480 : Programming in HTML 5 With JavaScript and CSS 3 Number : 70-480 Passing Score : 800 Time Limit : 120 min File Version : 1.0 http://www.gratisexam.com/ Sections 1. Module 1-Overview of HTML and CSS 2. Module 2-Creating and Styling HTML Pages 3. Module 3-Introduction to JavaScript 4. Module 4-Creating Forms to Collect and Validate User Input 5. Module 5-Communicating with a Remote Server 6. Module 6-Styling HTML5 by Using CSS3 7. Module 7-Creating Objects and Methods by Using JavaScript 8. Module 8-Creating Interactive Pages by Using HTML5 APIs 9. Module 9-Adding Offline Support to Web Applications 10. Module 10-Implementing an Adaptive User Interface 11. Module 11-Creating Advanced Graphics 12. Module 12-Animating the User Interface 13. Module 13-Implementing Real-time Communication by Using Web Sockets 14. Module 14-Performing Background Processing by Using Web Workers
Transcript
Page 1: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

70-480 : Programming in HTML 5 With JavaScript and CSS 3

Number: 70-480Passing Score: 800Time Limit: 120 minFile Version: 1.0

http://www.gratisexam.com/

Sections1. Module 1-Overview of HTML and CSS2. Module 2-Creating and Styling HTML Pages3. Module 3-Introduction to JavaScript4. Module 4-Creating Forms to Collect and Validate User Input5. Module 5-Communicating with a Remote Server6. Module 6-Styling HTML5 by Using CSS37. Module 7-Creating Objects and Methods by Using JavaScript8. Module 8-Creating Interactive Pages by Using HTML5 APIs9. Module 9-Adding Offline Support to Web Applications10.Module 10-Implementing an Adaptive User Interface11.Module 11-Creating Advanced Graphics12.Module 12-Animating the User Interface13.Module 13-Implementing Real-time Communication by Using Web Sockets14.Module 14-Performing Background Processing by Using Web Workers

Page 2: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

Exam A

QUESTION 1

?

A. 1980B. 1992C. 2000D. 2002

Correct Answer: BSection: Module 1-Overview of HTML and CSSExplanation

Explanation/Reference:

QUESTION 2

A. Hyper Tranformation Markup LanguageB. Hyper Text Markup LookupC. Hyper Text Markup LanguageD. Higher Text Markup Language

Correct Answer: CSection: Module 1-Overview of HTML and CSSExplanation

Explanation/Reference:

QUESTION 3

A. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 5 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd>

B. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd>

C. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">D. <!DOCTYPE html>

Correct Answer: DSection: Module 1-Overview of HTML and CSSExplanation

Explanation/Reference:<!DOCTYPE html> is Doctype declaration for HTML5

QUESTION 4Which Tag elements represent a top-level heading in your document, which browsers tend to render as text ina large, bold font

Page 3: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

http://www.gratisexam.com/

A. h6B. h7C. h5D. h1

Correct Answer: DSection: Module 1-Overview of HTML and CSSExplanation

Explanation/Reference:h1 Tag elements represent a top-level heading in your document, which browsers tend to render as text in alarge, bold font

QUESTION 5Use the <noscript> element

A. To alert users that your page uses JavaScript, and so the user should enable JavaScript in the browser inorder to display your page correctly.

B. Automatically enable JavaScriptC. Activate JavaScriptD. Non of the above

Correct Answer: ASection: Module 3-Introduction to JavaScriptExplanation

Explanation/Reference:To alert users that your page uses JavaScript, and so the user should enable JavaScript in the browser in orderto display your page correctly.

QUESTION 6Correct Code for Unordered lists group sets of items in no particular order

A.

B.

Page 4: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

C.

D. <ul> <il>Notepad</il> <il>Textmate</il> <il>Visual Studio</il> </ul>

Correct Answer: BSection: Module 1-Overview of HTML and CSSExplanation

Explanation/Reference:

QUESTION 7 which is mandory

attribute in this line

A. altB. srcC. heightD. width

Correct Answer: BSection: Module 2-Creating and Styling HTML PagesExplanation

Explanation/Reference:Only the src attribute is mandatory in image tag

QUESTION 8Correct way to add javascript file reference in website

A. <script type="text/javascript" src="alertme.js"></script>B. <script type="text/jscript" src="alertme.js"></script>C. <script type="javascript" src="alertme.js"></script>D. <script type="text/javascript"></script>

Correct Answer: ASection: Module 3-Introduction to JavaScriptExplanation

Explanation/Reference:

QUESTION 9The target attribute identifies where the browser will display the linked page; valid values are ( Select One orMore)

Page 5: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

A. _blankB. _parentC. _selfD. _top

Correct Answer: ABCDSection: Module 2-Creating and Styling HTML PagesExplanation

Explanation/Reference:

QUESTION 10how to add comments in your style sheet

A. //B. /* */C. ///D. No of the above

Correct Answer: BSection: Module 6-Styling HTML5 by Using CSS3Explanation

Explanation/Reference:You can also add comments to your style sheets by using /* */ delimiters

QUESTION 11The [ ] attribute is the most important part of linking one online resource to another. i.e <a> tag

Correct Answer: The [href] attribute is the most important part of linking one online resource to another.Section: Module 2-Creating and Styling HTML PagesExplanation

Explanation/Reference:

QUESTION 12Which is secure method in HTTP ?

A. GETB. POSTC. All of aboveD. None of the Above

Correct Answer: BSection: Module 2-Creating and Styling HTML PagesExplanation

Explanation/Reference:POST for HTTP POST. This is the preferred valueGET for HTTP GET. This is the default value, but is not secure

QUESTION 13

Page 6: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

A.

B.

C.

D.

Correct Answer: BSection: Module 2-Creating and Styling HTML PagesExplanation

Explanation/Reference:

QUESTION 14Correct HTML Code for Sending Mail

A. <a href="mailto:[email protected]"> [email protected]</a>

B. <a emailto="[email protected]"> [email protected]</a>

C. <a mailto="[email protected]"> [email protected]</a>

D. <a href="[email protected]"> [email protected]</a>

Correct Answer: ASection: Module 2-Creating and Styling HTML PagesExplanation

Explanation/Reference:<a href="mailto:[email protected]"> [email protected]</a>is correct one

QUESTION 15CSS is an acronym for

A. Cascade Style SheetsB. Cascadinng Sheet StyleC. Cascading Style SheetsD. Cascading Style Sheets

Correct Answer: CSection: Module 6-Styling HTML5 by Using CSS3Explanation

Explanation/Reference:CSS is an acronym for Cascading Style Sheets

QUESTION 16

Page 7: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

Every CSS rule has the same basic structure:

A. selector { property1 value; property2 value; .. propertyN value;}

B. selector { property1:value , property2:value, .. propertyN:value.}

C. selector { property1:value. property2:value. .. propertyN:value.}

D. selector { property1:value; property2:value; .. propertyN:value;}

Correct Answer: DSection: Module 6-Styling HTML5 by Using CSS3Explanation

Explanation/Reference:

QUESTION 17Which of the following list in basic selectors

A. element selectorB. class selectorC. id selectorD. All the Above

Correct Answer: DSection: Module 6-Styling HTML5 by Using CSS3Explanation

Explanation/Reference: The element selector identifies the group of all elements in the page with that name. For example, h2 {}

Page 8: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

returns the set of all level two headings in the page. · The class selector, identified by a period, returns the set of all elements in the page where the classattribute is set to the specified value. For example, .myClass {} returns the set of elements where the classattribute is set to "myClass".

· The id selector, identified by a hash, returns the set of all elements in the page where the id attribute isset to the specified value. For example, #thisId {} returns the set of any elements where the id attribute is set to"thisId"

QUESTION 18What is the wildcard selector ?

A. returns the set of all the elements in a documentB. returns the wildcard set of all the elements in a documentC. returns the content type of tag in a documentD. All of above

Correct Answer: ASection: Module 6-Styling HTML5 by Using CSS3Explanation

Explanation/Reference:

QUESTION 19What is mean by HTML Inheritance ?

A. HTML elements inherit some properties from their parent elements unless specified otherwise B. HTML elements inherit any properties from their parent elements unless specified otherwiseC. HTML elements inherit all properties from their parent elements unless specified otherwiseD. Non of the above

Correct Answer: ASection: Module 6-Styling HTML5 by Using CSS3Explanation

Explanation/Reference:like body tag css inherited to the h1 h2 p etc tag inside body

QUESTION 20Which is the most appropriate templates From Visual Studio 2010 or 2012 to create web applications usingHTML5, CSS3, and JavaScript.

A. ASP.NET Empty Web SiteB. ASP.NET Web SiteC. ASP.NET Web Site (Razer)D. ASP.NET Empty Web Application

Correct Answer: ADSection: Module 6-Styling HTML5 by Using CSS3Explanation

Explanation/Reference:The most appropriate templates are the ASP.NET Empty Web Site and ASP.NET Empty Web Applicationtemplates

Page 9: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

QUESTION 21 Visual Studio Express 2012 for Web used as web application IDE

A. Paid VersionB. Trial VersionC. Free to download and install D. All the above

Correct Answer: CSection: Module 2-Creating and Styling HTML PagesExplanation

Explanation/Reference: Visual Studio Express 2012 for Web Free to download and install

QUESTION 22What are the four elements that define the basic structure of an HTML page?

A. DOCTYPEB. <body>C. <head>D. <html>

Correct Answer: ABCDSection: Module 1-Overview of HTML and CSSExplanation

Explanation/Reference:

QUESTION 23What is the best way to apply CSS rules to HTML elements that occur in several different pages?

A. Include all rules for each element in the <style> attribute of the element.B. Include the rules for each page in a <style> element in the <head> elementC. Write the rules for the whole site in one or more style sheets and reference them by using a <style> element

in the <head> element of each page.D. Write the rules for the whole site in one or more style sheets and reference them by using a <link> element

in the <head> element of each page.

Correct Answer: DSection: Module 6-Styling HTML5 by Using CSS3Explanation

Explanation/Reference:Write the rules for the whole site in one or more style sheets and reference them by using a <link> element inthe <head> element of each page.

QUESTION 24Visual Studio also includes a new development web server called

A. IIS ServerB. IIS ExpressC. IIS Light Weight ServerD. IIS 8.0

Page 10: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

Correct Answer: BSection: Module 2-Creating and Styling HTML PagesExplanation

Explanation/Reference: Visual Studio also includes a new development web server called IIS Express. This web server provides manyof the same features as IIS, except that it is optimized for the development environment.Note :Previous editions of Visual Studio provided the ASP.NET Development Server. This server is stillavailable, but IIS Express has fewer limitations. For example, IIS Express includes the integrated pipeline modeof the full IIS that was not available in the ASP.NET Development Server.

QUESTION 25What features provided by Visual Studio 2012 for extensive debugging of JavaScript code.

A. You can set breakpointsB. single step through codeC. examine and modify the contents of variablesD. view the call stack

Correct Answer: ABCDSection: Module 3-Introduction to JavaScriptExplanation

Explanation/Reference:Visual Studio 2012 provides extensive debugging features for JavaScript code You can set breakpoints, single step through code, examine and modify the contents of variables, view the callstack, and perform many other common debugging tasks.

QUESTION 26Microsoft has provided the F12 Developer Tools as a feature of Internet Explorer. These tools enable adeveloper to quickly perform the which of following tasks while the application is running in Internet Explorer

A. Inspect and validate HTML markup and CSS style sheets.B. Run and debug JavaScript code.C. Profile page load times to optimize an application.D. View a page as if it were being viewed in Internet Explorer versions 7, 8, 9, or 10

Correct Answer: ABCDSection: Module 3-Introduction to JavaScriptExplanation

Explanation/Reference:Microsoft has provided the F12 Developer Tools as a feature of Internet Explorer. These tools enable adeveloper to quickly perform the following tasks while the application is running in Internet Explorer: · Inspect and validate HTML markup and CSS style sheets. · Run and debug JavaScript code. · Profile page load times to optimize an application. · View a page as if it were being viewed in Internet Explorer versions 7, 8, 9, or 10

QUESTION 27WHATWG Stands for

Page 11: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

A. What Hypertext Application Technology Working GroupB. Web Hypertext Application Technology Working GroupC. Web Hypertext Application Technology Work GroupD. Web Hypertext Transfer Application Technology Working Group

Correct Answer: BSection: Module 1-Overview of HTML and CSSExplanation

Explanation/Reference:

QUESTION 28What are the aims HTML5 ?

A. Not to "break the web". HTML5 is backwards compatible with previous versions of HTML.B. Add new features that reflect how the web is now used. For example, HTML5 supports form validation and

video.C. Specify how every browser should behave when working with HTML. All HTML implementations can be

interoperable. This behavior includes defining how to handle errors.D. Be universally accessible. Features should work across all devices, in any language, and for the disabled.

Correct Answer: ABCDSection: Module 1-Overview of HTML and CSSExplanation

Explanation/Reference:All the Above Features come under aim of HTML5

QUESTION 29Which of following statement is correct about <article> element & <section> element

A. An <article> element can contain a <section> element and vice versa not trueB. An <article> element can contain a <section> element C. An <article> element can contain a <section> element and vice versaD. An <section> element can contain a <article> element

Correct Answer: DSection: Module 2-Creating and Styling HTML PagesExplanation

Explanation/Reference: An <article> element can contain a <section> element and vice versa and this should be emphasized. There'sno single correct way to organize the content for a page.

QUESTION 30Margin and padding are both shorthand properties. you can just use padding or margin. example, padding isset to 10px. How you could write this ?

A. padding-top: 10px;padding-bottom : 10px;padding-left : 10px;padding-right : 10px;

B. padding-right : 10px;padding-left : 10px;

Page 12: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

padding-top: 10px;padding-bottom : 10px;

C. padding-top: 10px;padding-right : 10px;padding-bottom : 10px;padding-left : 10px;

D. padding-top: 10px;padding-right : 10px;padding-left : 10px;padding-bottom : 10px;

Correct Answer: CSection: Module 6-Styling HTML5 by Using CSS3Explanation

Explanation/Reference:Here sequence is matter You can easily recall the order of the sides by thinking of the word TRouBLe: Top, Right, Bottom, and Left.

QUESTION 31CSS also provides the background shortcut property which enables you to set some or all of the elements justdescribed. You must set the values for these properties in the following order:

Build List and Reorder:

Correct Answer:

Page 13: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

Section: Module 6-Styling HTML5 by Using CSS3Explanation

Explanation/Reference:

QUESTION 32What are the new elements that HTML5 provides for specifying the semantic meaning of content in a webpage?

A. The <html>, <head>, <title> and <body> elementB. The <section>, <header>, <footer>, <nav>, <article>, and <aside> elementsC. The <section> and <article> elementsD. The <section>, <p>, <b> elements

Correct Answer: BSection: Module 6-Styling HTML5 by Using CSS3Explanation

Explanation/Reference:The <section>, <header>, <footer>, <nav>, <article>, and <aside> elements

QUESTION 33Which of the following items is NOT a property of the CSS box model?

A. MarginB. ContentC. BorderD. Style

Correct Answer: DSection: Module 6-Styling HTML5 by Using CSS3Explanation

Explanation/Reference:Except Style ( ) Margin( ) Content( ) Border(√) Style( ) Padding

Page 14: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

QUESTION 34The combination of JavaScript and the XMLHttpRequest API Known as

A. Asynchrous java script APIB. AsyncJavaScript APIC. AJAXD. XMLHttpRequest API

Correct Answer: CSection: Module 5-Communicating with a Remote ServerExplanation

Explanation/Reference:The combination of JavaScript and the XMLHttpRequest API (commonly referred to as AJAX) enables a webpage to make asynchronous requests back to the web server. The JavaScript code for a page can use thisfeature to query a server for more information, without requiring that the entire page be reloaded in the browser

QUESTION 35JavaScript is a scripting engine with the same basic features as any other programming language.Select One or More Feature from following List:

A. The ability to create objects with properties, methods, and events.B. Functions for grouping statements into reusable chunks.C. Conditional statements and loop constructs to control program flow.D. Variables for storing information. Operators for performing calculations and comparisons.

Correct Answer: ABCDSection: Module 3-Introduction to JavaScriptExplanation

Explanation/Reference:All the Above supported by javascript

Page 15: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

QUESTION 36Microsoft's implementation of ECMA-262 is called as

A. JSScriptB. JScriptC. JavaScriptD. Non of the above

Correct Answer: BSection: Module 3-Introduction to JavaScriptExplanation

Explanation/Reference:Microsoft's implementation of ECMA-262 is called as JScript

QUESTION 37All statements in JavaScript should be written on a single line and be terminated with a semicolon. Theexception to this rule is that you can split a large string over several lines (for readability)

A. document.write("An incredibly really \ very long greeting to the world");

B. document.write("An incredibly really" &_ "very long greeting to the world");

C. document.write("An incredibly really" + "very long greeting to the world");

D. document.write("An incredibly really" & "very long greeting to the world");

Correct Answer: ASection: Module 3-Introduction to JavaScriptExplanation

Explanation/Reference: by using a backslash. For example: document.write("An incredibly really \ very long greeting to the world");

QUESTION 38JavaScript supports two different styles of comment (Select Any Two)

A. /* */B. ///C. //D. <--- -->

Correct Answer: ACSection: Module 3-Introduction to JavaScriptExplanation

Explanation/Reference: multi-line comments that begin with /* and end with */, and single-line comments that begin with // and finish atthe end of the line.

QUESTION 39Find the output of following <script type="text/javascript">

Page 16: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

x=10 + 10; y="10"+10; z="Ten"+10; document.write("x= " + x + " y= " + y + "z= " +z); </script>

A. x=20 y=1010 z= Ten10B. x= 20 y= 1010z= Ten10C. x= 20 , y= 0101, z= Ten10D. x= 20 y= 1010z= 10Ten

Correct Answer: BSection: Module 3-Introduction to JavaScriptExplanation

Explanation/Reference:x= 20 y= 1010z= Ten10 in IE 10 in notepad mydemo.html open same in browser

QUESTION 40Find the out put of following javascript code<script type="text/javascript"> var zero = 0; var emptyString = ""; var False = false;document.write("</br> zero == False returns " + (zero == False));document.write("</br> zero === False returns " + (zero === False));document.write("</br> emptyString == False returns " + (emptyString == False));document.write("</br> emptyString === False returns " + (emptyString === False));

</script>

A. zero == False returns truezero === False returns trueemptyString == False returns trueemptyString === False returns true

B. zero == False returns truezero === False returns falseemptyString == False returns trueemptyString === False returns false

C. zero == False returns falsezero === False returns trueemptyString == False returns falseemptyString === False returns true

D. zero == False returns truezero === False returns falseemptyString == False returns falseemptyString === False returns false

Correct Answer: BSection: Module 3-Introduction to JavaScriptExplanation

Explanation/Reference:0, "" (the empty string), undefined, and null all evaluate to false in Boolean operations. Always use === when comparing to any of these values. var zero = 0; var emptyString = ""; var False = false;

Page 17: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

zero == False; // returns true; zero === False; // returns false; emptyString == False; // returns true; emptyString === False; // returns false;

QUESTION 41What are true statement about function declaration

A. A set of JavaScript statements enclosed in a pair of curly braces. These statements run when the functionis invoked.

B. The function name. You use this name to run the function. It is case-sensitiveC. The function keyword indicates this is the start of a function definition.D. A comma-separated list of values, called arguments, which you can pass to the function. This list is

enclosed in parentheses. If the function has no arguments, it should still have the pair of parentheses afterits name

Correct Answer: ABCDSection: Module 3-Introduction to JavaScriptExplanation

Explanation/Reference:All the above need to used while function declaration

QUESTION 42if you wanted to calculate the total hotel bill for a guest, you might write the following function and call it like so.

A. function CalculateBill(numberOfNightsStay, nightlyRate) { return (numberOfNightsStay * nightlyrate) + extras; } … // elsewhere in the script var TotalAmountOwed = CalculateBill(10, 100, 50);

B. function CalculateBill(numberOfNightsStay, nightlyRate, extras) { numberOfNightsStay * nightlyrate) + extras; } … // elsewhere in the script var TotalAmountOwed = CalculateBill(10, 100, 50);

C. function CalculateBill(numberOfNightsStay, nightlyRate, extras) { return (numberOfNightsStay * nightlyrate) + extras; } … // elsewhere in the script var TotalAmountOwed = CalculateBill(10, 100, 50);

D. function CalculateBill(numberOfNightsStay, nightlyRate, extras) { return (numberOfNightsStay * nightlyrate) + extras; } … // elsewhere in the script var TotalAmountOwed = CalculateBill(10, 50);

Correct Answer: CSection: Module 3-Introduction to JavaScript

Page 18: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

Explanation

Explanation/Reference:This is syntax of creating function so answer three correct equal parameter and calling function parameter noshould match. function aName( argument1, argument2, …, argumentN ) { statement1; statement2; … statementN; }

QUESTION 43Find the output of following code<script type="text/javascript"> function Display( fname, mname, lname){ if(arguments.length==3) document.write("My Name : " + arguments[0] + " " +arguments[1] + " " +arguments[4] ); else document.write("Invalid name parameters");}//calling function Display Display("Sachin","S", "Nimbalkar");//calling function Display with two parameters document.write("</br>"); Display("Sachin", "Nimbalkar");

</script>

A. ErrorB. My Name : Sachin S undefined

Invalid name parametersC. My Name : Sachin S Nimbalkar

Invalid name parametersD. None of above

Correct Answer: BSection: Module 3-Introduction to JavaScriptExplanation

Explanation/Reference:arguments[4] is not defined so undefined will print

QUESTION 44Which of following statement is correct

A. all functions have a name.B. Not all functions have a name.C. all functions must have a name.D. Non of above.

Correct Answer: BSection: Module 3-Introduction to JavaScriptExplanation

Page 19: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

Explanation/Reference:Not all functions have a name. You can even declare anonymous functions. You typically use anonymousfunctions when writing code to handle events or implement callbacks. In these cases, the function is invoked bythe browser (or whatever environment your code happens to be running in) rather than by your code, and it isreferenced by a variable rather than its name

QUESTION 45Find the output of following javascript <script type="text/javascript"> var typeOfRoom="king"; switch (typeOfRoom) { case "Suite": RoomRate = 500; break; //Use break to prevent code in next case statement bein case "King": RoomRate = 400; break; default: // code to be executed if typeOfRoom does not match above cases. RoomRate = 300;}document.write( "For " + typeOfRoom +" RoomRate = " +RoomRate);

</script>

A. For king RoomRate = 300 B. ErrorC. For king RoomRate = 400;D. For king RoomRate = 500

Correct Answer: ASection: Module 3-Introduction to JavaScriptExplanation

Explanation/Reference:Best Practice: Note that in the above switch example, if the value of typeOfRoom is suite or king, RoomRatewill be set to 300

because JavaScript is case sensitive. To solve this, make the text all lowercase using switch(typeOfRoom.toLowerCase()) and

write all the case values in lower case.

QUESTION 46Which of the following sentense is correct

A. JavaScript is an not language in which to write object-oriented web applicationsB. JavaScript is an excellent language in which to write object-oriented web applicationsC. JavaScript is an excellent language in which we can not write object-oriented web applicationsD. None the above

Correct Answer: BSection: Module 3-Introduction to JavaScriptExplanation

Page 20: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

Explanation/Reference:JavaScript is an excellent language in which to write object-oriented web applications

QUESTION 47JavaScript provides APIs for JSON (JavaScript Object Notation)

A. for parsing JSON data (JSON.parsefy)B. for converting data into JSON format (JSON.stringify)C. for parsing JSON data (JSON.parse)D. Non of the above

Correct Answer: BCSection: Module 5-Communicating with a Remote ServerExplanation

Explanation/Reference:JSON has become increasingly important as it is currently the de facto format for passing data in an AJAXrequest between a web page and a web server. JavaScript provides APIs for converting data into JSON format(JSON.stringify), and for parsing JSON data (JSON.parse).

QUESTION 48JavaScript provide several built-in object types String, Date , Array, RegExp etcFind output of following javascript code<script type="text/javascript">var eventWelcome = new String('Welcome to your conference');var len = eventWelcome.length;var today = new Date(2012, 8, 1); var seasonsArray = new Array("Spring", "Summer", "Autumn", "Winter");var thirdSeason = seasonsArray[3]; var re = new RegExp("\\[dh\\]og"); if (re.test("dog")){ var ans= "og Found in text";} else { var ans= "og Not Found in text";}

document.write("len = " + len + " today : " + today + " thirdSeason " + thirdSeason + " Ans of RegExp " +ans);</script>

A. len = 26 today : Sat Sep 01 2012 00:00:00 GMT+0530 (India Standard Time) thirdSeason Winter Ans ofRegExp og Found in text

B. len = 26 today : Sat Sep 01 2012 00:00:00 GMT+0530 (India Standard Time) thirdSeason Winter Ans ofRegExp og Not Found in text

C. len = 25 today : Sat Sep 01 2012 00:00:00 GMT+0530 (India Standard Time) thirdSeason Winter Ans ofRegExp og Not Found in text

D. len = 26 today : Sat Sep 01 2012 00:00:00 GMT+0530 (India Standard Time) thirdSeason Autumn Ans ofRegExp og Not Found in text

Correct Answer: BSection: Module 5-Communicating with a Remote ServerExplanation

Explanation/Reference:len = 26 today : Sat Sep 01 2012 00:00:00 GMT+0530 (India Standard Time) thirdSeason Winter Ans ofRegExp og Not Found in text

QUESTION 49

Page 21: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

What is True about DOM (Document Object Model)

A. The DOM was designed to be dependent of any one programing languageB. The DOM was designed to be independent of any one programing languageC. The DOM was designed to be dependent of one programing languageD. Non of the above

Correct Answer: BSection: Module 4-Creating Forms to Collect and Validate User InputExplanation

Explanation/Reference:The DOM was designed to be independent of any one programing language The DOM specification wascompleted in 2004 and assumes that a web page is written in HTML 4.01 or XHTML 1, which were thestandards available at that time. Work is currently under way to simplify the DOM specification and to update itfor HTML5 and CSS3. This work is currently known as DOM4.

QUESTION 50What are mostly used method to get control contents ?

A. document.forms.contactForm.elements[0]B. document.forms.contactForm.elements["nameBox"]C. document.getElementById()D. document.getElementsByName( )

Correct Answer: CDSection: Module 4-Creating Forms to Collect and Validate User InputExplanation

Explanation/Reference:Mention that the getElementById and getElementByName methods are the most commonly used ways ofobtaining a reference to an element

QUESTION 51DOM Core API defines several methods to create new objects for a document Select One Or More From list

A. document.createElement(tagname) B. document.createTextNode(string) C. document.createAttribute(name, value)D. document.createDocumentFragment

Correct Answer: ABCDSection: Module 3-Introduction to JavaScriptExplanation

Explanation/Reference:

All the above

QUESTION 52What are correct statement ?

A. Note that Internet Explorer 6, Internet Explorer 7, and Internet Explorer 8 do not support addEventListener()and removeEventListener(). Use the similar attachEvent() and detachEvent() functions instead.

B. Note that Internet Explorer 6, Internet Explorer 7, do not support addEventListener() and

Page 22: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

removeEventListener(). Use the similar attachEvent() and detachEvent() functions instead. C. Note that Internet Explorer 7, and Internet Explorer 8 do not support addEventListener() and

removeEventListener(). Use the similar attachEvent() and detachEvent() functions instead.D. Note that Internet Explorer 8 do not support addEventListener() and removeEventListener(). Use the similar

attachEvent() and detachEvent() functions instead.

Correct Answer: ASection: Module 3-Introduction to JavaScriptExplanation

Explanation/Reference:Note that Internet Explorer 6, Internet Explorer 7, and Internet Explorer 8 do not support addEventListener()and removeEventListener(). Use the similar attachEvent() and detachEvent() functions instead.Keep the code in an event handler short and concise. Long-running event handlers may impact theresponsiveness of the browser.Some events in the HTML DOM 'bubble', meaning that if the event occurs on an element (and it is or isn'thandled), the event will then also fire on the element's parent node and then on its grandparent node and so onuntil the event reaches an element where it may not bubble any further or it reaches the root node. BothaddEventListener and removeEventListener have an optional third Boolean parameter indicating whether or notthis is the case.

QUESTION 53Find the correct statement

A. jQuery is an properatory JavaScript library that deals with cross-browser incompatibilities for youB. jQuery is an open source JavaScript library that deals with IE browser incompatibilities for you C. jQuery is an open source JavaScript library that deals with cross-browser incompatibilities for youD. jQuery is an open source JavaScript library that deals with Mozila FireFox-browser incompatibilities for you

Correct Answer: CSection: Module 3-Introduction to JavaScriptExplanation

Explanation/Reference:

QUESTION 54how to add reference in your web page of jQuery (JavaScript file =jquery-1.8.0.min.js)

A. <link src="Scripts/jquery-1.8.0.min.js" type="text/javascript"></link> B. <script src="Scripts/jquery-1.8.0.min.js" type="text/javascript"></script> C. <script src="//ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.0.min.js" type="text/javascript"></script>

D. All the above

Correct Answer: BCSection: Module 3-Introduction to JavaScriptExplanation

Explanation/Reference:jQuery is a JavaScript file that you reference in your page with a script tag. You can download it and reference alocal copy in your page. <script src="Scripts/jquery-1.8.0.min.js" type="text/javascript"></script> Alternatively, you can reference its location on one of several Content Delivery Networks (CDNs), whichensures faster downloads and caching in the browser.

Page 23: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

<script src="//ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.0.min.js" type="text/javascript"></script>

QUESTION 55All variables in JavaScript are strongly typed, and you must specify the type of a variable when you create it.True or False?

A. FalseB. TrueC.D.

Correct Answer: ASection: Module 3-Introduction to JavaScriptExplanation

Explanation/Reference:False is correct answer

QUESTION 56What is the purpose of the DOM?

A. The DOM represents the structure of a web page. You use it to add dynamic functionality to the page.B. The DOM represents the structure of a web page. You use it to add static functionality to the page.C. The DOM represents the structure of a web page. You use it to add functions to the page.D. The DOM represents the structure of a tags. You use it to add dynamic functionality to the page.

Correct Answer: ASection: Module 3-Introduction to JavaScriptExplanation

Explanation/Reference:The DOM represents the structure of a web page. You use it to add dynamic functionality to the page.

QUESTION 57Which jQuery function indicates that the contents for a page have been loaded into the browser?

A. loadedB. $C. readyD. bind

Correct Answer: CSection: Module 7-Creating Objects and Methods by Using JavaScriptExplanation

Explanation/Reference:<script type="text/javascript">$(document).ready(function () { $("#submit").click( function () { var userName = $("#NameBox").val(); $("#thankYouArea").replaceWith("<p>Thank you " + userName + "</p>"); })});ready() verifies that all content for page are loaded successfully. then proceed.

Page 24: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

QUESTION 58If you define a field with an HTML5 input type that is not supported by the user's browser, the field does notappear on the form when the browser displays it. True or False?

A. FalseB. TrueC.D.

Correct Answer: ASection: Module 4-Creating Forms to Collect and Validate User InputExplanation

Explanation/Reference:

QUESTION 59If you perform validation in the browser, is it necessary to perform the same validation checks in the servercode that processes the data, or is this additional processing redundant?

A. You should not validate data at the server regardless of whether it has already been validated by thebrowser.

B. You should validate data at the server regardless of whether it has already been validated by the browser.C. You should sometime validate data at the server regardless of whether it has already been validated by the

browser.D. You should always validate data at the server regardless of whether it has already been validated by the

browser.

Correct Answer: DSection: Module 4-Creating Forms to Collect and Validate User InputExplanation

Explanation/Reference:

QUESTION 60You should always use the input event to validate data that a user enters into a field, in preference to the submitevent of the form. True or False?

A. FalseB. TrueC.D.

Correct Answer: ASection: Module 4-Creating Forms to Collect and Validate User InputExplanation

Explanation/Reference:

QUESTION 61Which attribute need Emphasize in input controls of HTML 5

A. nameB. id

Page 25: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

C. name and idD. non of the above

Correct Answer: CSection: Module 4-Creating Forms to Collect and Validate User InputExplanation

Explanation/Reference: An id and name attribute. The id attribute is typically used by CSS to style the field and JavaScript code thatcontrol the field in the browser; the name attribute is used by the server to reference fields on the form when itis submitted.

QUESTION 62 Specify the type attribute of the <input> element

A. button, checkbox, color, date, datetime, datetime-local, email, file, hidden, image, month, number,password, radio, range, reset, search, submit, tel, text, time, url, or week

B. checkbox, color, date, datetime, datetime-local, email, file, hidden, image, month, number, password, radio,range, reset, search, submit, tel, text, time, url, or week

C. button, color, date, datetime, datetime-local, email, file, hidden, image, month, number, password, radio,range, reset, search, submit, tel, text, time, url, or week

D. datetime, datetime-local, email, file, hidden, image, month, number, password, radio, range, reset, search,submit, tel, text, time, url, or week

Correct Answer: ASection: Module 4-Creating Forms to Collect and Validate User InputExplanation

Explanation/Reference:Specify the type attribute of the <input> element, providing one of the following values: button, checkbox, color, date, datetime, datetime-local, email, file, hidden, image,month, number, password, radio, range, reset, search, submit, tel, text, time, url, or week. Note that not all these types are not yet fully adopted or even implemented by most browsers. They aredesigned to fail back to harmless text fields where they are not implemented.

QUESTION 63The [] attribute indicates that a field is mandatory and that the form should not be submitted if it is left blank. a)compusary b) required c) * d) i dont know

Correct Answer: The required attribute indicates that a field is mandatory and that the form should not besubmitted if it is left blank.Section: Module 4-Creating Forms to Collect and Validate User InputExplanation

Explanation/Reference:The required attribute indicates that a field is mandatory and that the formshould not be submitted if it is left blank.

QUESTION 64With HTML5, How you can control the upper and lower limits of numeric input

A. <input id="percentage" type="number" upperbound="100" lowerboumd="0" />B. <input id="percentage" type="number" maximum="100" minimum="0" />C. <input id="percentage" type="number" maxvalue="100" minvalue="0" />D. <input id="percentage" type="number" max="100" min="0" />

Page 26: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

Correct Answer: DSection: Module 4-Creating Forms to Collect and Validate User InputExplanation

Explanation/Reference:With HTML5, you can control the upper and lower limits of numeric input. The following code shows anexample: <input id="percentage" type="number" max="100" min="0" />

QUESTION 65Where we can use this validation<input id="orderRef" name="orderReference" type="text" pattern="[0-9]{2}[A-Z]{3}" title="2 digits and 3uppercase letters" />

A. if you require an order reference to comply with the pattern 99XXX, where 9 is any digit and X is any caseletter

B. if you require an order reference to comply with the pattern 99XXX, where 9 is only digit 9 and X is any caseletter

C. if you require an order reference to comply with the pattern 99XXX, where 9 is any digit and X is anyuppercase letter

D. non of the above

Correct Answer: CSection: Module 4-Creating Forms to Collect and Validate User InputExplanation

Explanation/Reference:if you require an order reference to comply with the pattern 99XXX, where 9 is any digit and X is any uppercaseletter, use the HTML5 pattern attribute to specify a regular expression to validate the field. You can provide feedbackto the user about the expected format of the data by using the title attribute.

QUESTION 66What are best pratice in validation logic implementation on client side

A. On submit show all validation errorsB. show messagebox (alert) while entering data.C. To dynamically use validation to change the color of the borderD. No of the above

Correct Answer: CSection: Module 4-Creating Forms to Collect and Validate User InputExplanation

Explanation/Reference: This technique works by detecting the validation state of the input control by using the valid and invalid pseudo-classes, and providing a rule for the border color for each state. input{ border: solid 1px; } input:invalid { border-color: #f00; } input:valid { border-color: #0f0;

Page 27: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

}

QUESTION 67Correct code ajax() to get LuckyId number from webservice method at the URL /luckydip/enter and set resultelement ID=answer

A. $.ajax({ url: '/luckydip/enter', type: 'GET', timeout: 12000, dataType: 'text' }).succes(function( responseText ){ $('#answer').text( responseText ); }).error(function() { alert('An error has occurred - you may not have been entered'); });

B. $.ajax({ type: 'GET', timeout: 12000, dataType: 'text' }).done(function( responseText ){ $('#answer').text( responseText ); }).fail(function() { alert('An error has occurred - you may not have been entered'); });

C. $.ajax({ url: '/luckydip/enter', type: 'GET', timeout: 12000, dataType: 'text' }).done(function( responseText ){ $('#answer').text( responseText ); }).fail(function() { alert('An error has occurred - you may not have been entered'); });

D. Non of the above

Correct Answer: CSection: Module 5-Communicating with a Remote ServerExplanation

Explanation/Reference:The example on the slide uses the done and fail functions to handle the success and error cases. Version 1.7 of jQuery defined the success and error callbacks as part of the object defined by the ajax()function, but these are deprecated in version 1.8.

The url property is the URL of the web service method or remote resource. The type property can be set to GET or POST. The timeout property causes the call to abort after a time specified in milliseconds. The dataType property governs the response type you are expecting from the server, and can be set to avariety of values, including text, xml, html, json, and script.The done function is called when the call returns and the response data is parsed correctly. The fail function is called if the request fails for any reason.

QUESTION 68Which is correct way to send forms data to the server by using the $.ajax() function,

Page 28: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

use the POST method and add a JSON-formatted data property containing the data to be sent to the parameterlist

A. $.ajax({ url: '/luckydip/enterWithName', type: 'POST', timeout: 12000, dataType: 'text', data: { firstName: myForm.fname.value, lastName: myForm.lname.value }).done(... ).fail(... );

B. $.ajax({ url: '/luckydip/enterWithName', type: 'POST', timeout: 12000, dataType: 'text', data: { ('#myForm').serializeArray(); } }).done(... ).fail(... );

C. $.ajax({ url: '/luckydip/enterWithName', type: 'POST', timeout: 12000, dataType: 'text', data: { ('#myForm').serialize(); } }).done(... ).fail(...

D. Non of the above

Correct Answer: ASection: Module 5-Communicating with a Remote ServerExplanation

Explanation/Reference:The serializeArray() function generates a JSON-formatted array of field names and valuesThe serialize() function generates a list of fields and values formatted as a query stringHint : these methods will take the fields on a form and serialize the entire form in one statement. When using thesemethods, you do not get to rename the fields, so they will be named just as they are on the form while using data each field on a form in this way gives you precise control over which fields are sent and whatthe properties of the object NoteCare should be taken when using these methods because they will not include fields that are hidden or thathave a CSS display attribute set to none. Note that there is no submit button value in the array. This is because, from a technicallyaccurate viewpoint, the form was not submitted by using the usual form submission mechanism.

Page 29: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

QUESTION 69In the onreadystatechanged event handler for the XMLHttpRequest object, which property should you examineto ensure that data has been returned, and what value should this property contain?

A. The readyState property should be set to 0.B. The responseText property should be set to a non-null value.C. The readyState property should be set to 4.D. The status property should be set to 200 (HTTP OK).

Correct Answer: CSection: Module 5-Communicating with a Remote ServerExplanation

Explanation/Reference:

QUESTION 70If you use the jQuery get() function to retrieve data and you do not specify an error handling function, anyfailures while retrieving the data will cause your JavaScript code to stop with an unhandled exception. True orFalse?

A. TrueB. FalseC.D.

Correct Answer: BSection: Module 5-Communicating with a Remote ServerExplanation

Explanation/Reference:

QUESTION 71Which CSS rule can you use to download a font required by a web page?

A. @font-familyB. @font-styleC. @font-faceD. @font

Correct Answer: CSection: Module 6-Styling HTML5 by Using CSS3Explanation

Explanation/Reference:

QUESTION 72What are the main differences between the CSS box model, flex-box, and multi-column layout?

A. Flex-box is sets out the number of content columns within a box. Multi-column layout module for the boxmodel.

B. Flex-box is a layout module for the box model. Multi-column layout sets out the number of content rowswithin a box.

Page 30: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

C. Flex-box is a layout module for the box model.Multi-column layout sets out the number of content columnswithin a box.

D. Non of above

Correct Answer: CSection: Module 6-Styling HTML5 by Using CSS3Explanation

Explanation/Reference:Flex-box is a layout module for the box model.Multi-column layout sets out the number of content columnswithin a box.

QUESTION 73How do you select the first item in a list so that you can apply styling to it?

A. Use the li:first-child selector in CSS3.B. Use the li:first-childeelement selector in CSS3.C. Use the li:first-childtagcontent selector in CSS3.D. Use the li:first-childvalue selector in CSS3.

Correct Answer: ASection: Module 6-Styling HTML5 by Using CSS3Explanation

Explanation/Reference:Use the li:first-child selector in CSS3.

QUESTION 74Which of following example shows how to use the @font-face rule to download the TrueType® version of theRoboto Regular font, and use it to style some paragraphs. Using the @font-face Rule

A. @font-face { font-family: 'RobotoRegular'; src: url('Roboto-Regular-webfont.rtf') format('truetype'); font-stretch: normal; // Default font-weight: normal; // Default font-style: normal; // Default unicode: U+0-10FFFF; // Default } p { font-family : RobotoRegular, "Segoe UI", Arial; font-size: 14px; }

B. @font-face { font-family: 'RobotoRegular'; src: url('Roboto-Regular-webfont.ttf') format('truetype'); font-stretch: normal; // Default font-weight: normal; // Default font-style: normal; // Default unicode: U+0-10FFFF; // Default } p { font-family : RobotoRegular, "Segoe UI", Arial; font-size: 14px; }

Page 31: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

C. @font-face { font-family: 'RobotoRegular'; font-stretch: normal; // Default font-weight: normal; // Default font-style: normal; // Default unicode: U+0-10FFFF; // Default } p { font-family : RobotoRegular, "Segoe UI", Arial; font-size: 14px; }

D. non of the above

Correct Answer: BSection: Module 6-Styling HTML5 by Using CSS3Explanation

Explanation/Reference:The @font-face rule enables you to specify a font file to download, give it a name, and then use it in your CSSrules just like

any other web-safe font such as Times, Arial, and Helvetica.

QUESTION 75When you set the font-size property, the most common units used for that property are [] for print style sheetsand [] for screen style sheets. a) points b) picas c) millimeters d) pixels

Correct Answer: When you set the font-size property, the most common units used for that property are[points] for print style sheets and [pixels] for screen style sheets.Section: Module 6-Styling HTML5 by Using CSS3Explanation

Explanation/Reference:When you set the font-size property, the most common units used for that propertyare [points] for print style sheets and [pixels] for screen style sheets

QUESTION 76Best Practise to adjust image height and width for setting to a maximum of the browser window height andwidth minus Xpx This ensures you can always see the full image in your browser.

A. 05pxB. 10pxC. 15pxD. 20px

Correct Answer: ASection: Module 6-Styling HTML5 by Using CSS3Explanation

Explanation/Reference:You can also use the calc() function to calculate a measurement at runtime. For example: img { max-height: calc(100vh - 5px); max-width: calc(100vw - 5px); }

Page 32: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

QUESTION 77The core CSS typographic properties enable you to style text by setting following properties

A. letter-spacing, line-height,B. text-align, text-decoration,C. text-transform propertiesD. All the above

Correct Answer: DSection: Module 6-Styling HTML5 by Using CSS3Explanation

Explanation/Reference:all the above are Core properties However, the CSS3 Text module defines several more properties that provide even greater control over thelayout of your text content. These properties include: · The text-indent property, which indicates how far the first line of each new text block should beindented. text-indent: 3rem; · The hyphens property, which indicates how the browser should hyphenate words when line-wrapping.Possible values are none (no hyphenating), manual (use the &shy; sequence in your text to indicate wherehyphens can be placed), and auto. hyphens: manual; -ms-hyphens : manual; // IE10 · The word-wrap property, which indicates whether the browser may break lines within words when line-wrapping. Possible values are normal (the default is no), and break-word (the browser may break words at anarbitrary point). It has been renamed overflow-wrap in CSS3, but at this time browsers only recognize the oldname. word-wrap : normal; · The word-spacing property, which enables you to set the spacing between words in a block of text.You can use both relative and absolute measurements. word-spacing : 5px; word-spacing : 2rem; · The text-shadow property, which enables you to apply shadowing to the selected text. A shadow isdefined by four properties: · x-offset: How far to the right the shadow starts. Use a negative value to move it to the left. · y-offset: How far below the shadow starts. Use a negative value to move it up. · blur (optional): How wide the blur of the shadow is. The default is 0. · color: Can be any color value. The default is black. text-shadow: 0 1px 0 #000; // not supported in Internet Explorer 9 and earlier versions.

QUESTION 78CSS enables you to define the layouts and the types of boxes that you can display on a web page select one ormore

A. block: Block boxes are formatted down the page one after another and respect padding, border, and marginvalues. display:block;

B. inline: Inline layout blocks are formatted one after another based on the baseline of their text content untilthey break down onto another line, and so on. Inline blocks ignore height and width values. display:inline;

C. inline-block: Inline-block layout blocks are formatted one after another based on the baseline of their textcontent, but they keep their height and width values. display:inline-block;

D. table: Table layout enables you to identify blocks on the page as tables, rows, columns, and cells. Blocksare aligned by their edges rather than their content, and sized to fit the computed table.

Page 33: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

display:table;

Correct Answer: ABCDSection: Module 6-Styling HTML5 by Using CSS3Explanation

Explanation/Reference:Select All the above and

flexbox: Flexbox layout is new in CSS3 and designed to be far more fluid than the others. You choose in whichdirection boxes are laid out and how boxes are sized, depending on how any excess whitespace around blocksshould be handled. display: flexbox; // for a block-level flexbox container display: -ms-flexbox; display: inline-flexbox; // for an inline flexbox container display: -ms-inline-flexbox;

Note: Note that the display values for enabling flexbox layout were correct when written; the values may changebefore the CSS3 Flexbox Module is finalized.All of these layout models (possibly with the exception of flexbox, depending on the final implementation)assume that blocks are arranged according to the normal flow of elements.

QUESTION 79Which is correct statement about

A. In CSS1 and CSS2, pseudo-elements start with double colon (::). In CSS3, pseudo-elements start with a colon (:) to differentiate them from pseudo-classes

B. In CSS1 and CSS2, pseudo-elements start with a colon (:). In CSS3, pseudo-elements start with a doublecolon (::) to differentiate them from pseudo-classes

C. In CSS1 and CSS3, pseudo-elements start with a colon (:). In CSS2, pseudo-elements start with a doublecolon (::) to differentiate them from pseudo-classes

D. Non of the above

Correct Answer: BSection: Module 6-Styling HTML5 by Using CSS3Explanation

Explanation/Reference:Officially However most browsers still use single colons.

QUESTION 80There are five pseudo-classes for hyperlinks please connect to respective match

Drop and Connect:

Page 34: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

Correct Answer:

Section: Module 6-Styling HTML5 by Using CSS3Explanation

Explanation/Reference:There are several mnemonics for remembering the correct order (LVFHA) for link pseudo-classes. One is Las

Page 35: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

Vegas fights Hell's Angels. Another is Let Victoria Free Her Armies.

QUESTION 81There are three pseudo-classes that you frequently use for forms elements: (select only three)

A. input:unchecked selects all user interface elements that are unchecked.B. input:enabled selects all enabled input controls.C. input:checked selects all user interface elements that are checked.D. input:disabled selects all user interface elements that are disabled.

Correct Answer: BCDSection: Module 6-Styling HTML5 by Using CSS3Explanation

Explanation/Reference:input:unchecked is wrong answer

QUESTION 82 You use the CSS color property to modify the color of text content. CSS3 extends this functionality by enablingto apply color backgrounds, borders, outlines, column rules, and more How many color defined in color module

A. 255B. 127C. 147D. 512

Correct Answer: BSection: Module 6-Styling HTML5 by Using CSS3Explanation

Explanation/Reference:

color: yellow;.

QUESTION 83 A red-green-blue (RGB) model value specified in

A. color: #ff0; /* three-digit hexadecimal notation*/B. color: #ffff00; /* #rrggbb six-digit hexadecimal notation*/C. color: rgb(255, 255, 0); /* a triplet of integers */D. color: rgb(100%, 100%, 0%); /* triplet of percentage values */

Correct Answer: ABCDSection: Module 6-Styling HTML5 by Using CSS3Explanation

Explanation/Reference:Each of the three values represents the amount of red, green, and blue is included in the color, with values for each between 0 and 255 (0 to 100%)

QUESTION 84 A red-green-blue-alpha (RGBA) model value of Color CSS value of as rgba(0,0,0,0) same as

A. color: transparent;

Page 36: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

B. color: opacity;C. color: white;D. Non of the above

Correct Answer: ASection: Module 6-Styling HTML5 by Using CSS3Explanation

Explanation/Reference:The keyword transparent, which is the same value as rgba(0,0,0,0)

QUESTION 85What is mean by (HSL) model in Color CSS value specified as a triplet of numbers

A. A hue-saturation-lightness The first is an integer indicating the percentage value for saturation. Thesecond is a angle of the color circle (0 = red, 120 = green, 240 = blue) . The third is also apercentage value for lightness

B. A hue-saturation-lightness The first is an integer indicating the angle of the color circle (0 = red, 120= green, 240 = blue). The second is a percentage value for saturation . The third is also a percentagevalue for lightness

C. A hue-saturation-lightness The first is an integer indicating the angle of the color circle (0 = red, 120= green, 240 = blue). The second is a percentage value for lightness. The third is also a percentagevalue for saturation

D. Non of the above

Correct Answer: BSection: Module 6-Styling HTML5 by Using CSS3Explanation

Explanation/Reference:A hue-saturation-lightness (HSL) model value specified as a triplet of numbers. The first is an integer valuebetween 0 and 360 indicating the angle of the color circle (0 = red, 120 = green, 240 = blue). The second is apercentage value for saturation where 0% is a shade of grey and 100% is full color. The third is also apercentage value for lightness, where 0% is black, 100% is white and 50% is normal.color: hsl(60, 100%, 50%);

QUESTION 86What is use of Inherit keyword in CSS3

A. This indicates that the element should inherit the same color value as its child elementB. This indicates that the element should inherit the base color value as its parent elementC. This indicates that the element should inherit the same color value as its parent elementD. Non of the above

Correct Answer: CSection: Module 6-Styling HTML5 by Using CSS3Explanation

Explanation/Reference:The keyword currentColor. This indicates the same value should be used as that of the element's colorproperty. Writing color:currentColor is the same as writing color:inherit.

QUESTION 87What is css for bluearrow.png will be repeated left to right along the top edge of the article element andgreenarrow.png will be repeated top to bottom along the left edge of the article element. The image declaredfirst in the list appears on top of the others, so bluearrow.png appears above greenarrow.png in the top left

Page 37: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

corner of the article element

A. article { background-image: url('bluearrow.png'), url('greenarrow.png'); background-repeat: repeat-y, repeat-x; }

B. article { background-image: url('greenarrow.png'),url('bluearrow.png') ; background-repeat: repeat-x, repeat-y; }

C. article { background-image: url('bluearrow.png'), url('greenarrow.png'); background-repeat: repeat-x, repeat-y; }

D. Non of the above

Correct Answer: CSection: Module 6-Styling HTML5 by Using CSS3Explanation

Explanation/Reference:

QUESTION 88What are two type of Gradients?

A. linear gradientB. circular gradient,C. square gradient,D. radial gradient,

Correct Answer: ADSection: Module 6-Styling HTML5 by Using CSS3Explanation

Explanation/Reference: A linear gradient, which is a gradual change in color from the start color to the stop color. By default, thestart color is displayed at the top of the background and the end color at the bottom, although the direction ofthe gradient may be changed. background: linear-gradient(direction, start-color, [mid-color-list,] end-color); e.g background: linear-gradient(30deg, blue, green, yellow); · A radial gradient, which is a gradual change in color from a central point in the start-color outwards ineither a circle or an elliptical shape to the end color at the edge of the shape. Any number of intermediate colorscan be set in the list. background: radial-gradient(position, shape, start-color, [mid-color-list,] end-color); e.g background: radial-gradient(top right, ellipse, red, blue);

QUESTION 89What are example of drawing shapes Using CSS3

A. You can draw Rectangle like this: #rectangle-topleft { width: 0;

Page 38: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

height: 0; border-top: 200px solid blue; border-right: 200px solid transparent; }

B. You can draw triangles like this: #triangle-topleft { width: 0; height: 0; border-top: 200px solid blue; border-right: 200px solid transparent; }

C. You can draw shapes such as circles and ovals by using the border-radius property to add curves to asquare. #circle { width: 200px; height: 200px; background: blue; border-radius: 50%; }

D. For example, to draw a square or rectangle, just use the height and width properties with a backgroundcolor: #square { width: 200px; height: 200px; background: blue; }

Correct Answer: Section: Module 6-Styling HTML5 by Using CSS3Explanation

Explanation/Reference:All the Above are example of Drawing shap using css3

QUESTION 90What is use of translate3d(x,y,z) in Transforming Elements in CSS3

A. Moves the one side element by the distance x along the x-axis, y along the y-axis, and z along the z-axis.B. Moves the half side element by the distance x along the x-axis, y along the y-axis, and z along the z-axis.C. Moves the partial element by the distance x along the x-axis, y along the y-axis, and z along the z-

axis.D. Moves the whole element by the distance x along the x-axis, y along the y-axis, and z along the z-axis.

Correct Answer: DSection: Module 6-Styling HTML5 by Using CSS3Explanation

Explanation/Reference:Moves the whole element by the distance x along the x-axis, y along the y-axis, and z along the z-axis.

QUESTION 91How can you guard against name clashes in JavaScript?

A. You can use immediately invoked functions, define namespaces, and use strict mode.B. You can use immediately invoked functions, define classes, and use strict mode.C. You can use immediately invoked functions, define namespaces, and use explicit mode.

Page 39: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

D. Non of the above

Correct Answer: ASection: Module 7-Creating Objects and Methods by Using JavaScriptExplanation

Explanation/Reference:You can use immediately invoked functions, define namespaces, and use strict mode.

QUESTION 92If you modify the prototype object for a constructor function, the changes are only visible to new objects that youcreate by using that constructor function; existing objects created by using the constructor function will beunaffected. True or False?

A. FalseB. TrueC.D.

Correct Answer: ASection: Module 7-Creating Objects and Methods by Using JavaScriptExplanation

Explanation/Reference:False is answer

QUESTION 93Which of the following statements is true?

A. JavaScript uses the public, private, and protected keywords to implement encapsulation.B. JavaScript does not support encapsulation.C. JavaScript uses the Object.create() function to implement encapsulation.D. JavaScript uses closures to achieve encapsulation.

Correct Answer: DSection: Module 7-Creating Objects and Methods by Using JavaScriptExplanation

Explanation/Reference:JavaScript uses closures to achieve encapsulation.

QUESTION 94Find the output of following javascript code<script> var num=7; function demonstrateScopingAndHosting(){ if(true){ var num=42; } alert("The value of num is"+num); } //calling functiondemonstrateScopingAndHosting(); </script>

Page 40: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

http://www.gratisexam.com/

A. The value of num is7B. The value of num is42C. ErrorD. Non of the above

Correct Answer: BSection: Module 3-Introduction to JavaScriptExplanation

Explanation/Reference:

QUESTION 95What are the example of singleton classess

A. database driver manager class :that is responsible for choosing which database driver to use to open aconnection to a database.

B. screen manager class that is responsible for organizing the layout of windows in a single screen.C. mathematical class that provides algebraic and trigonometric functions such as sin, cos, andD. Non of above

Correct Answer: ABCSection: Module 7-Creating Objects and Methods by Using JavaScriptExplanation

Explanation/Reference:One of the best known design patterns in object-oriented development is the singleton pattern. The singletonpattern describes how to ensure that there is only ever a single instance of a class in existence. Typical uses ofthe singleton pattern might include the following classes: A database driver manager class that is responsible for choosing which database driver to use to open aconnection to a database. A screen manager class that is responsible for organizing the layout of windows in a single screen. A mathematical class that provides algebraic and trigonometric functions such as sin, cos, and tan

QUESTION 96Inside which HTML element do we put the JavaScript?

A. <javascript>B. <script>C. <js>D. <scripting>

Correct Answer: BSection: Module 3-Introduction to JavaScriptExplanation

Page 41: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

Explanation/Reference:

QUESTION 97What is the correct JavaScript syntax to write "Hello World"?

A. response.write("Hello World")B. document.write("Hello World")C. "Hello World"D. ("Hello World")

Correct Answer: BSection: Module 3-Introduction to JavaScriptExplanation

Explanation/Reference:

QUESTION 98Where is the correct place to insert a JavaScript?

A. The <body> sectionB. Both the <head> section and the <body> section are correctC. The <head> section

Correct Answer: BSection: Module 3-Introduction to JavaScriptExplanation

Explanation/Reference:

QUESTION 99What is the correct syntax for referring to an external script called "xxx.js"?

A. <script type="text/javascript" href="xxx.js">B. <script type="text/javascript" src="xxx.js">C. <script type="text/javascript" name="xxx.js">

Correct Answer: BSection: Module 6-Styling HTML5 by Using CSS3Explanation

Explanation/Reference:

QUESTION 100The external JavaScript file must contain the <script> tag

A. FalseB. True

Correct Answer: ASection: Module 6-Styling HTML5 by Using CSS3Explanation

Page 42: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

Explanation/Reference:

QUESTION 101How do you write "Hello World" in an alert box?

A. msgBox("Hello World")B. alertBox="Hello World"C. alert("Hello World")D. alertBox("Hello World")

Correct Answer: CSection: Module 3-Introduction to JavaScriptExplanation

Explanation/Reference:

QUESTION 102How do you create a function?

A. function:myFunction()B. function=myFunction()C. function myFunction()

Correct Answer: CSection: Module 3-Introduction to JavaScriptExplanation

Explanation/Reference:

QUESTION 103How do you call a function named "myFunction"?

A. myFunction()B. call function myFunctionC. call myFunction()

Correct Answer: ASection: Module 3-Introduction to JavaScriptExplanation

Explanation/Reference:

QUESTION 104How do you write a conditional statement for executing some code if "i" is equal to 5?

A. if (i==5)B. if i=5C. if i=5 thenD. if i==5 then

Correct Answer: A

Page 43: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

Section: Module 3-Introduction to JavaScriptExplanation

Explanation/Reference:

QUESTION 105How do you write a conditional statement for executing some code if "i" is NOT equal to 5?

A. if =! 5 thenB. if (i != 5)C. if (i <> 5)D. if <>5

Correct Answer: BSection: Module 3-Introduction to JavaScriptExplanation

Explanation/Reference:

QUESTION 106How does a "while" loop start?

A. while (i<=10;i++)B. while i=1 to 10C. while (i<=10)

Correct Answer: CSection: Module 3-Introduction to JavaScriptExplanation

Explanation/Reference:

QUESTION 107How does a "for" loop start?

A. for (i <= 5; i++)B. for (i = 0; i <= 5)C. for (i = 0; i <= 5; i++)D. for i = 1 to 5

Correct Answer: CSection: Module 3-Introduction to JavaScriptExplanation

Explanation/Reference:

QUESTION 108How can you add a comment in a JavaScript?

A. 'This is a commentB. //This is a comment

Page 44: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

C. <!--This is a comment-->

Correct Answer: BSection: Module 3-Introduction to JavaScriptExplanation

Explanation/Reference:

QUESTION 109What is the correct JavaScript syntax to insert a comment that has more than one line?

A. //This comment has more than one line//B. /*This comment has more than one line*/C. <!--This comment has more than one line-->

Correct Answer: BSection: Module 3-Introduction to JavaScriptExplanation

Explanation/Reference:

QUESTION 110What is the correct way to write a JavaScript array?

A. var txt = new Array(1:"tim",2:"kim",3:"jim")B. var txt = new Array:1=("tim")2=("kim")3=("jim")C. var txt = new Array="tim","kim","jim"D. var txt = new Array("tim","kim","jim")

Correct Answer: DSection: Module 3-Introduction to JavaScriptExplanation

Explanation/Reference:

QUESTION 111How do you round the number 7.25, to the nearest integer?

A. Math.round(7.25)B. rnd(7.25)C. round(7.25)D. Math.rnd(7.25)

Correct Answer: ASection: Module 3-Introduction to JavaScriptExplanation

Explanation/Reference:

QUESTION 112How do you find the number with the highest value of x and

Page 45: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

A. top(x,y)B. Math.ceil(x,y)C. ceil(x,y)D. Math.max(x,y)

Correct Answer: DSection: Module 3-Introduction to JavaScriptExplanation

Explanation/Reference:

QUESTION 113What is the correct JavaScript syntax for opening a new window called "w2" ?

A. w2=window.open("http://www.w3schools.com");B. w2=window.new("http://www.w3schools.com");

Correct Answer: ASection: Module 3-Introduction to JavaScriptExplanation

Explanation/Reference:

QUESTION 114How do you put a message in the browser's status bar?

A. status("put your message here")B. window.status("put your message here")C. statusbar = "put your message here"D. window.status = "put your message here"

Correct Answer: BSection: Module 3-Introduction to JavaScriptExplanation

Explanation/Reference:

QUESTION 115How can you find a client's browser name?

A. navigator.appNameB. browser.nameC. client.navName

Correct Answer: ASection: Module 3-Introduction to JavaScriptExplanation

Explanation/Reference:

QUESTION 116Which of the following is correct?

Page 46: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

A. jQuery is a JSON LibraryB. jQuery is a JavaScript Library

Correct Answer: BSection: Module 7-Creating Objects and Methods by Using JavaScriptExplanation

Explanation/Reference:

QUESTION 117jQuery uses CSS selectors and XPath expressions to select elements?

A. TrueB. False

Correct Answer: BSection: Module 6-Styling HTML5 by Using CSS3Explanation

Explanation/Reference:

QUESTION 118Which sign does jQuery use as a shortcut for jQuery?

A. the $ signB. the ? SignC. the % sign

Correct Answer: ASection: Module 7-Creating Objects and Methods by Using JavaScriptExplanation

Explanation/Reference:

QUESTION 119With jQuery, look at the following selector: $("div"). What does it select?

A. All div elementsB. The first div element

Correct Answer: ASection: Module 7-Creating Objects and Methods by Using JavaScriptExplanation

Explanation/Reference:

QUESTION 120Is jQuery a library for client scripting or server scripting?

A. Server scriptingB. Client scripting

Page 47: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

Correct Answer: BSection: Module 7-Creating Objects and Methods by Using JavaScriptExplanation

Explanation/Reference:

QUESTION 121Is it possible to use jQuery together with AJAX?

A. NoB. Yes

Correct Answer: BSection: Module 7-Creating Objects and Methods by Using JavaScriptExplanation

Explanation/Reference:

QUESTION 122The jQuery html() method works for both HTML and XML documents

A. TrueB. False

Correct Answer: BSection: Module 7-Creating Objects and Methods by Using JavaScriptExplanation

Explanation/Reference:

QUESTION 123What is the correct jQuery code to set the background color of all p elements to red?

A. $("p").style("background-color","red");B. $("p").manipulate("background-color","red")C. $("p").css("background-color","red");D. $("p").layout("background-color","red");

Correct Answer: CSection: Module 7-Creating Objects and Methods by Using JavaScriptExplanation

Explanation/Reference:

QUESTION 124With jQuery, look at the following selector: $("div.intro"). What does it select?

A. The first div element with id="intro"B. All div elements with class="intro"C. The first div element with class="intro"D. All div elements with id="intro"

Page 48: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

Correct Answer: BSection: Module 7-Creating Objects and Methods by Using JavaScriptExplanation

Explanation/Reference:

QUESTION 125Which jQuery method is used to hide selected elements?

A. hidden()B. hide()C. display(none)D. visible(false)

Correct Answer: BSection: Module 7-Creating Objects and Methods by Using JavaScriptExplanation

Explanation/Reference:

QUESTION 126Which jQuery method is used to set one or more style properties for selected elements?

A. css()B. style()C. html()

Correct Answer: ASection: Module 7-Creating Objects and Methods by Using JavaScriptExplanation

Explanation/Reference:

QUESTION 127Which jQuery method is used to perform an asynchronous HTTP request?

A. jQuery.ajax()B. jQuery.ajaxSetup()C. jQuery.ajaxAsync()

Correct Answer: ASection: Module 7-Creating Objects and Methods by Using JavaScriptExplanation

Explanation/Reference:

QUESTION 128What is the correct jQuery code for making all div elements 100 pixels high?

A. $("div").height="100"B. $("div").height(100)

Page 49: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

C. $("div").yPos(100)

Correct Answer: BSection: Module 7-Creating Objects and Methods by Using JavaScriptExplanation

Explanation/Reference:

QUESTION 129Which statement is true?

A. To use jQuery, you must buy the jQuery library at www.jquery.comB. To use jQuery, you do not have to do anything. Most browsers (Internet Explorer, Chrome, Firefox and

Opera) have the jQuery library built in the browserC. To use jQuery, you can refer to a hosted jQuery library at Google

Correct Answer: CSection: Module 7-Creating Objects and Methods by Using JavaScriptExplanation

Explanation/Reference:

QUESTION 130What scripting language is jQuery written in?

A. VBScriptB. JavaScript

Correct Answer: BSection: Module 7-Creating Objects and Methods by Using JavaScriptExplanation

Explanation/Reference:

QUESTION 131Which jQuery function is used to prevent code from running, before the document is finished loading?

A. $(document).ready()B. $(document).load()C. $(body).onload()

Correct Answer: ASection: Module 7-Creating Objects and Methods by Using JavaScriptExplanation

Explanation/Reference:

QUESTION 132Which jQuery method should be used to deal with name conflicts?

A. noConflict()

Page 50: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

B. noNameConflict()C. nameConflict()D. conflict()

Correct Answer: BSection: Module 7-Creating Objects and Methods by Using JavaScriptExplanation

Explanation/Reference:

QUESTION 133Which jQuery method is used to switch between adding/removing one or more classes (for CSS) from selectedelements?

A. switchClass()B. switch()C. altClass()D. toggleClass()

Correct Answer: DSection: Module 7-Creating Objects and Methods by Using JavaScriptExplanation

Explanation/Reference:

QUESTION 134Look at the following jQuery selector: $("div#intro .head"). What does it select?

A. All elements with class="head" inside the first div element with id="intro"B. All div elements with id="intro" or class="head"C. The first element with id="head" inside any div element with class="intro"

Correct Answer: BSection: Module 7-Creating Objects and Methods by Using JavaScriptExplanation

Explanation/Reference:

QUESTION 135Is jQuery a W3C standard?

A. YesB. No

Correct Answer: BSection: Module 7-Creating Objects and Methods by Using JavaScriptExplanation

Explanation/Reference:

QUESTION 136Slect Interfaces in HTMl5 File API

Page 51: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

A. Blob : interface represents immutable raw data.B. File : interface inherits from Blob, and represents an individual file.C. FileList : interface is a collection of File objects.D. FileReader : interface enables an application to read a file or blob into a JavaScript variable.

Correct Answer: ABCDSection: Module 8-Creating Interactive Pages by Using HTML5 APIsExplanation

Explanation/Reference:All the above are correct answers.

QUESTION 137FileReader interface provides three methods for reading data ?

A. readAsString() reads a file or blob and makes the contents available as an string. B. readAsText() reads a file or blob and makes the contents available as plain text. C. readAsDataURL() reads a file or blob and makes the contents available as a data URL. D. readAsArrayBuffer() reads a file or blob and makes the contents available as an ArrayBuffer.

Correct Answer: BCDSection: Module 8-Creating Interactive Pages by Using HTML5 APIsExplanation

Explanation/Reference:

QUESTION 138Rearrange step for DragDrop in HTML5

Build List and Reorder:

Correct Answer:

Section: Module 8-Creating Interactive Pages by Using HTML5 APIsExplanation

Page 52: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

Explanation/Reference:

QUESTION 139 Find Correct Code in HTML5 for creates a video player that is 300 pixels wide and 200 pixels high. An imagenamed "MyPoster.jpg" will be displayed while the video is being downloaded. As soon as the video has beendownloaded, it will start playing immediately with the audio muted.

A. <video src="MyVideo.mp4" width="300" height="200" poster="MyPoster.jpg" />

B. <video src="MyVideo.mp4" width="300" height="200" poster="MyPoster.jpg" autoplay muted controls loop />

C. <video src="MyVideo.mp4" width="200" height="300" poster="MyPoster.jpg" autoplay muted controls loop />

D. <video src="MyVideo.mp4" width="300" height="200" poster="MyPoster.jpg" autoplay muted controls />

Correct Answer: BSection: Module 8-Creating Interactive Pages by Using HTML5 APIsExplanation

Explanation/Reference:

QUESTION 140Some browsers support *.mp4, *.webm , *.ogy video formats so what should strategy while implementing videotag ?

A. you can provide only versions of your video in different formatsB. you can provide two versions of your video in different formatsC. you can provide several versions of your video in different formatsD. None of the above

Correct Answer: CSection: Module 8-Creating Interactive Pages by Using HTML5 APIsExplanation

Explanation/Reference:To support multiple video formats, include one or more <source> tags within the <video> tag. <video poster="MyPoster.jpg" autoplay controls> <source src="MyVideos/MyVideo.mp4" type='video/mp4' /> <source src="MyVideos/MyVideo.webm" type='video/webm' /> <source src="MyVideos/MyVideo.ogv" type='video/ogg' /> <!-- You can embed Flash or Silverlight content here, as a fallback -->

Page 53: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

<!-- You can also display some simple text in case the browser does not support the video tag --> Cannot play video. Download video <a href="MyVideos/MyVideo.webm">here</a> </video>

QUESTION 141Can we create <video> elements programmatically by using Document Object Model (DOM) functions inJavaScript code ?

A. YesB. NoC.D.

Correct Answer: ASection: Module 8-Creating Interactive Pages by Using HTML5 APIsExplanation

Explanation/Reference:Creating a Video Player by Using JavaScript Code function createVideoElement(nameOfVideoFile, nameOfHostElement) { // Create a video object and set its properties. var newVideo = document.createElement("video"); newVideo.src = nameOfVideo; newVideo.loop = true; newVideo.autoplay = true; newVideo.controls = true; newVideo.poster = "ImageLoading.png"; // Add the video object to an existing element on the web page. var hostElem = document.getElementById("videoDir"); hostElem.appendChild(newVideo); }

QUESTION 142Which is Correct statement about <video> and <audio> tags

A. The JavaScript API for audio is not similar to the API for videoB. The JavaScript API for audio is similiar to the API for videoC. The JavaScript API for audio is totally different from the API for videoD. Non of the above

Correct Answer: BSection: Module 8-Creating Interactive Pages by Using HTML5 APIsExplanation

Explanation/Reference:

QUESTION 143What is use of HTML5 Geolocation API ?

A. To get IP Address.B. To get browser details.C. To get geographical maps.D. To determine the current location of the browser

Page 54: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

Correct Answer: DSection: Module 8-Creating Interactive Pages by Using HTML5 APIsExplanation

Explanation/Reference:

QUESTION 144Location awareness is a key feature in many web applications which Runs on?

A. Desktop ApplicationsB. Web ApplicationC. Mobile devices and smartphones.D. Non of the above

Correct Answer: CSection: Module 8-Creating Interactive Pages by Using HTML5 APIsExplanation

Explanation/Reference:

QUESTION 145Geolocation API enables a web application to detect the current location of the device, expressed in ?

A. longitudeB. sealevelC. altitude. D. latitude

Correct Answer: ACDSection: Module 8-Creating Interactive Pages by Using HTML5 APIsExplanation

Explanation/Reference:Typical uses of the Geolocation API include: · Locating the current position of the user, and giving instructions on how to get to a new location. · Tracking the movement of a user to see how far they have travelled in a certain time period.

QUESTION 146HTML5 Geolocation API supports two types of position request select from following ?

A. navigator.geolocation.CurrentPosition()B. navigator.geolocation.watchPosition()C. navigator.geolocation.getPosition()D. navigator.geolocation.getCurrentPosition()

Correct Answer: BDSection: Module 8-Creating Interactive Pages by Using HTML5 APIsExplanation

Explanation/Reference: One-shot position request. To perform a one-shot position request, invoke thenavigator.geolocation.getCurrentPosition() method.

Page 55: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

Repeated position updates. To start receiving position updates, invoke thenavigator.geolocation.watchPosition() method. This method returns a watch ID value. To stop receiving position updates, invoke navigator.geolocation.clearWatch(), and pass the watch ID as aparameter.

QUESTION 147 The Page Visibility API consists of following properties and event:

A. The document.visibleState property indicates the detailed page visibility state, such as PAGE_VISIBLE orPAGE_PREVIEW.

B. The visibilitychange event fires any time the visibility state of the page changesC. The document.visibilityState property indicates the detailed page visibility state, such as PAGE_VISIBLE or

PAGE_PREVIEW.D. The document.hidden property describes whether the page is visible or not.

Correct Answer: BCDSection: Module 8-Creating Interactive Pages by Using HTML5 APIsExplanation

Explanation/Reference:

QUESTION 148To determine whether the browser is online or offline ?

A. The navigator.onLineStatus property, which indicates whether the browser is online or offline. B. The navigator.Browsable property, which indicates whether the browser is online or offline. C. The navigator.onLine property, which indicates whether the browser is online or offline. D. Non of the above

Correct Answer: CSection: Module 8-Creating Interactive Pages by Using HTML5 APIsExplanation

Explanation/Reference:

QUESTION 149HTML5 enables a web application to determine the browser type, also commonly known as the user agent.?

A. The navigator.userAgentDetails property, which returns a string indicating the user agent string for thebrowser

B. The navigator.userAgentInfo property, which returns a string indicating the user agent string for the browserC. The navigator.userAgent property, which returns a string indicating the user agent string for the browserD. Non of the abcve

Correct Answer: CSection: Module 8-Creating Interactive Pages by Using HTML5 APIsExplanation

Explanation/Reference:

QUESTION 150HTML5 provides the Navigation Timing API that enables you ?

Page 56: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

A. To determine the navigation system of your web applicationB. To determine the no of pages in your web applicationC. To determine the different timings in your web applicationD. To determine the download speed of your web application

Correct Answer: DSection: Module 8-Creating Interactive Pages by Using HTML5 APIsExplanation

Explanation/Reference:

QUESTION 151What methods are provided by the FileReader interface for reading files on the local file system?

A. readAsText(), readAsDataURL(), and readAsArrayBuffer().B. readAsText(), readAsURL(), and readAsArrayBuffer().C. readAsString(), readAsDataURL(), and readAsArrayBuffer().D. readAsText(), readAsDataURL(), and readAsJSONArray().

Correct Answer: ASection: Module 8-Creating Interactive Pages by Using HTML5 APIsExplanation

Explanation/Reference:

QUESTION 152HTML5 browsers are guaranteed to support the .mp4 video format. True or false?

A. FalseB. TrueC.D.

Correct Answer: ASection: Module 8-Creating Interactive Pages by Using HTML5 APIsExplanation

Explanation/Reference:

QUESTION 153What methods are provided by the navigator.geolocation object for obtaining geolocation information?

A. getCurrentLocation() and watchPosition().B. getCurrentPosition() and watchLocation().C. getCurrentPosition() and watchPosition().D. getCurrentGeoLocation() and watchPosition().

Correct Answer: CSection: Module 8-Creating Interactive Pages by Using HTML5 APIsExplanation

Page 57: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

Explanation/Reference:

QUESTION 154The F12 Developer Tools require that you have Visual Studio installed on your computer before you can usethem to debug JavaScript code. True or False?

A. TrueB. FalseC.D.

Correct Answer: BSection: Module 8-Creating Interactive Pages by Using HTML5 APIsExplanation

Explanation/Reference:

QUESTION 155What are the primary differences between data retained on a user's device by using session storage and byusing local storage?

A. Data stored by using session storage has a same scope and lifetime than data retained by using localstorage.

B. Data stored by using session storage has scope and lifetime not than data retained by using local storage.C. Data stored by using session storage has a different scope and lifetime than data retained by using local

storage.D. Non of the above

Correct Answer: CSection: Module 9-Adding Offline Support to Web ApplicationsExplanation

Explanation/Reference:

QUESTION 156You configure a web page to use the application cache to cache a resource locally. If the resource is modifiedat the web server, then the browser automatically downloads the latest version. True or false?

A. FalseB. TrueC.D.

Correct Answer: ASection: Module 9-Adding Offline Support to Web ApplicationsExplanation

Explanation/Reference:

QUESTION 157Which is correct statement about web application ?

Page 58: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

A. web applications are statefull, B. web applications are statehold, C. web applications are stateless, D. Non of the above

Correct Answer: CSection: Module 9-Adding Offline Support to Web ApplicationsExplanation

Explanation/Reference:

QUESTION 158Cookies can only store a very small amount of data, up to

A. 4 KB. B. 5 KB. C. 3 KB. D. 2 KB.

Correct Answer: ASection: Module 9-Adding Offline Support to Web ApplicationsExplanation

Explanation/Reference:

QUESTION 159Find the correct statement session storage?

A. There is specified maximum size for session storage; independ on the operating system,B. There is up to 4KB size for session storage; Independ on the operating system,C. There is no specified maximum size for session storage; any limits depend on the operating system,D. Non of the above

Correct Answer: CSection: Module 9-Adding Offline Support to Web ApplicationsExplanation

Explanation/Reference:

QUESTION 160You can test whether a browser implements session storage by querying for the presence of this property ?

A. if( window.sessionStorage ) { ... }

B. if( window.sessionStorageEnabled ) { ... }

C. if( window.HassessionStorage ) { ...

Page 59: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

}

D. Non of the above

Correct Answer: ASection: Module 9-Adding Offline Support to Web ApplicationsExplanation

Explanation/Reference:

QUESTION 161How many way the Session Storage API provides to store and retrieve data

A. Only Two waysB. Only Three waysC. Only Four waysD. Only One way

Correct Answer: BSection: Module 9-Adding Offline Support to Web ApplicationsExplanation

Explanation/Reference: Three ways to store and retrieve data: a) getItem and setItem functions. The setItem function expects you to provide the key and the data to store. The getItem function uses the key to return the data. If there is no data with the specified key, the valuereturned is null. sessionStorage.setItem("key","some text value"); var textFromSession = sessionStorage.getItem("key"); b) name-key pair. You can use array notation, and specify the key value as the array index. sessionStorage["key"] = "some text value"; var textFromSession2 = sessionStorage["key"];c) pseudo-properties. You can add a property for each key to the sessionStorage object. sessionStorage.key = "some text value"; var textFromSession3 = sessionStorage.key;

QUESTION 162Which is correct statement session data in HTML5 ?

A. Session data is only available to the page that wrote it.B. Session data is only available to all pages in web application.C. Session data is only available to the cross page posting.D. Non of the above

Correct Answer: ASection: Module 9-Adding Offline Support to Web ApplicationsExplanation

Explanation/Reference:

QUESTION 163What is correct statement about LocalStorage ?

Page 60: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

A. Data persisted in local storage is available same web page e.g webpage1.html in same website B. Data persisted in local storage is available in two web pages e.g webpage1.html and webpage2.html in

same website C. Data persisted in local storage is available across different web pages e.g webpage1.html, webpage2.html,

webpage3.html .....webpageN.html in same website D. Non of the above

Correct Answer: CSection: Module 9-Adding Offline Support to Web ApplicationsExplanation

Explanation/Reference:

QUESTION 164Use Following methods to complete the sentense w.r,t storage type.To remove an item from LocalStorage store []; To remove all items from the store [] ;To remove an item from SessionStorage store []; To remove all items from the store [];a) localStorage.removeItem("key") b) sessionStorage.removeIndex[0] c) localStorage.clearAll() d) sessionStorage.clear()e) sessionStorage.removeItem("key") f) localStorage.clear()

Correct Answer: To remove an item from LocalStorage store [localStorage.removeItem("key")]; To remove allitems from the store [localStorage.clear()]; To remove an item from SessionStorage store[sessionStorage.removeItem("key")]; To remove all items from the store [sessionStorage.clear()];Section: Module 9-Adding Offline Support to Web ApplicationsExplanation

Explanation/Reference:To remove an item from LocalStorage store localStorage.removeItem("key"); To remove all items from thestore localStorage.clear();To remove an item from SessionStorage store sessionStorage.removeItem("key"); To remove all items fromthe store sessionStorage.clear();

QUESTION 165The storage API to which both session and local storage conform includes a single event called storageWhich of following example shows how to subscribe to this event storage:

A. function myStorageCallback( e ) { alert("Key:" + e.key + " changed to " + e.newValue); } window.addEventListener("storage", myStorageCallback, true);

B. function myStorageCallback( e ) { alert("Key:" + e.key + " changed to " + e.Value); } window.addEventListener("storage", myStorageCallback, true);

C. function myStorageCallback( e ) { alert("Key:" + e.key + " changed to " + e.newkey); } window.addEventListener("storage", myStorageCallback, true);

D. function myStorageCallback( e ) { alert("Key:" + e.key + " changed to " + e.newValue); } window.addEventListener("storage", myStorageCallback, false);

Page 61: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

Correct Answer: ASection: Module 9-Adding Offline Support to Web ApplicationsExplanation

Explanation/Reference:

The event object passed to the event handler includes the following properties: · key: The name of the value which has changed. · oldValue: The original value before the change. · newValue: The new value. · url: The document whose script is the origin of the event. · storageArea: A reference to the store that has changed (session or local).

QUESTION 166What is correct statement about the Indexed Database API, or IndexedDB which is currently in the WorkingDraft stage from W3C

A. Provides an efficient mechanism for storing, retrieving, and searching for RDBMS data held locally on thedevice running the browser

B. Provides an efficient mechanism for storing, retrieving, and searching for logical data held locally on thedevice running the browser

C. Provides an efficient mechanism for storing, retrieving, and searching for structured data held locally on thedevice running the browser

D. Non of the above

Correct Answer: CSection: Module 9-Adding Offline Support to Web ApplicationsExplanation

Explanation/Reference:

QUESTION 167Find the correct statement about the application cache.

A. The application cache is a server-side storage mechanism that enables the developer to explicitly declarewhich static files should be cached by the browser

B. The application cache is a client-side storage mechanism that enables the developer to explicitly declarewhich static files should be cached by the server

C. The application cache is a client-side storage mechanism that enables the developer to explicitly declarewhich dynamic files should be cached by the browser

D. The application cache is a client-side storage mechanism that enables the developer to explicitly declarewhich static files should be cached by the browser

Correct Answer: DSection: Module 9-Adding Offline Support to Web ApplicationsExplanation

Explanation/Reference:The cache manifest file specifies the data that the web browser should retain in the application cache. This fileis a list of resources divided into separate sections labeled CACHE, NETWORK, and FALLBACK

To add a manifest file to an application, create a new text file and store it in the root folder of the web

Page 62: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

application. In this file, list all the static resources that should be downloaded and cached. This list will mostlikely include any graphics and images in the application, any HTML pages that do not have URL datadependencies, CSS files and JavaScript files, and so on. An example manifest file looks like this: CACHE MANIFEST CACHE: index.html verification.js site.css graphics/logo.jpg NETWORK: login # alternatives paths FALLBACK: ajax/account/ noCode.htm

This file should have the .manifest file extension.You can add comments to the manifest file by creating a new line starting with the pound symbol, #.To use the application cache, each web page must reference the manifest file that lists the resources to cache.A website can contain multiple manifest files, and different web pages can reference different manifest files.You specify the name of the manifest file to use in a web page by adding the manifest attribute to the <html>element. <html manifest="appcache.manifest">

QUESTION 168Application Cache are mainly informational. They can be used to determine the status of the cache and areuseful if the cache is behaving in an unexpected manner.Which of following example shows how to catch the error event of the application cache:

A. applicationCache.addEventListener( "error", function() { alert( "Error while downloading resources to the application cache"); }, false );

B. applicationCache.addEventListener( "errors", function() { alert( "Error while downloading resources to the application cache"); }, true );

C. applicationCache.addEventListener( "error", function() { alert( "Error while downloading resources to the application cache"); }, true );

D. Non of above

Correct Answer: CSection: Module 9-Adding Offline Support to Web ApplicationsExplanation

Explanation/Reference:

QUESTION 169 The behavior of the cache depends entirely on updates to the manifest file. Making a change to a resource onthe server no longer guarantees the browser will get the latest version of the file which of following code forces the web page to use the new resources

A. applicationCache.updateReady();

Page 63: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

... if (applicationCache.status == 4 ) { applicationCache.swapCache(); }

B. applicationCache.update(); ... if (applicationCache.status == 4 ) { applicationCache.UpdateCache(); }

C. applicationCache.Refresh(); ... if (applicationCache.status == 4 ) { applicationCache.swapCache(); }

D. Non of above

Correct Answer: ASection: Module 9-Adding Offline Support to Web ApplicationsExplanation

Explanation/Reference: The behavior of the cache depends entirely on updates to the manifest file. Making a change to a resource onthe server no longer guarantees the browser will get the latest version of the file The best way to force an update is to add a comments field in the manifest with a version number, forexample: #version=1.2.3 You can also use the update() function of the applicationCache object to initiate a check for updates, similar tothe one performed when a web page is first loaded. Any existing cached resources will continue to be used untilthe page is reloaded or you invoke the swapCache() function of the applicationCache object. In the code example below, the swapCache() function is called if the cache has been updated with newresources (status code 4 is the UPDATEREADY status).

This code forces the web page to use the new resources. applicationCache.update(); ... if (applicationCache.status == 4 ) { applicationCache.swapCache(); }

QUESTION 170What are the main device characteristics used by media queries to detect whether a client device is a hand-held tablet?

A. device-width, device-height, and orientationB. device-Name, device-Model, and orientationC. device-Manufacture, device-size, and orientationD. Non of the above

Correct Answer: ASection: Module 10-Implementing an Adaptive User InterfaceExplanation

Explanation/Reference:

Page 64: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

QUESTION 171How can you detect whether a user is running Internet Explorer to view your web page?

A. Use a conditional comment with the !=(IE) expression.B. Use a conditional comment with the <>(IE) expression.C. Use a conditional comment with the !(IE) expression.D. Non of the above

Correct Answer: CSection: Module 10-Implementing an Adaptive User InterfaceExplanation

Explanation/Reference:

QUESTION 172Creating adaptive user interface requires considering which of following items ?

A. Screen ResolutionB. Screen ReadersC. Display DensityD. Browser Capabilities

Correct Answer: ABCDSection: Module 10-Implementing an Adaptive User InterfaceExplanation

Explanation/Reference:All the above Screen ResolutionThe most obvious difference between a smartphone and a desktop monitor is the screen resolution, andtherefore the potential size of the browser window or viewport. As part of a responsive design, your site must beusable on any screen, whether it is 480, 1280, or 2560 pixels wide. Your website may adapt different types ofcontent by using the strategies in the following list:Display DensityThe resolution of a screen has varied widely for a while, but only recently has the density of a screen (measuredin dots per inch, or dpi) started to vary enough to make it worthwhile for browsers to detect and react to it.Increased screen density enables applications to present data with much greater clarity by using commonscreen resolutions. However, a larger screen density can cause the operating system to scale up all elementson a page, which can result in blurry images. TBrowser CapabilitiesDifferent browsers often have very different levels of functionality. For example, Internet Explorer 10implements many (but not all) of the features specified by HTML5 and CSS3, while browsers from othervendors implement a frequent cycle of releases to react to standards changes. You also need to consider themobile versions of browsers (including mobile versions of Internet Explorer) that have their own levels ofcompliance.Screen ReadersUsing the web is an entirely different experience for the visually impaired. Reading web content and navigationare both achieved aurally. When using aural properties, the canvas consists of a three-dimensional physicalspace (sound surrounds) and a temporal space (one may specify sounds before, during, and after othersounds). The CSS properties also allow you to vary the quality of synthesized speech (voice type, frequency,inflection, and so on.), the direction it comes from, and modify pauses, cues, and volume.

QUESTION 173Developers have had some ability to tailor styles to types of devices

Page 65: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

<link rel="stylesheet" type="text/css" href="core.css" media="XXXXXX" /> Which of following can be used as media type ?

A. all or print or screen or speechB. all or print or screen C. all or print D. all or screen

Correct Answer: ASection: Module 10-Implementing an Adaptive User InterfaceExplanation

Explanation/Reference:

QUESTION 174What is use of following conditional comments introduced by Microsoft <html> <head> <!--[if lt IE 10]> <p>Please upgrade to Internet Explorer 10.</p> <![endif]--> </head>

A. which detects whether the user is running a version of Internet Explorer equal to version 10:B. which detects whether the user is running a version of Internet Explorer upgraded version 10:C. which detects whether the user is running a version of Internet Explorer prior to version 10:D. Non of the above

Correct Answer: CSection: Module 10-Implementing an Adaptive User InterfaceExplanation

Explanation/Reference:

QUESTION 175Which of the following statements about SVG is false?

A. You can use SVG to draw complex shapes, and fill them with gradients and patterns.B. SVG elements are parsed by the browser when the page is first loaded, and they are then discarded from

memory.C. You can create SVG elements dynamically by using DOM functions such as document.createElement().D. SVG elements must be enclosed in an <svg> container element on a web page.

Correct Answer: BSection: Module 11-Creating Advanced GraphicsExplanation

Explanation/Reference:

QUESTION 176What mean by SVG ?

A. screen and vector-based

Page 66: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

B. scale and vector-basedC. scalable and vector-basedD. Non of the above

Correct Answer: CSection: Module 11-Creating Advanced GraphicsExplanation

Explanation/Reference:

QUESTION 177Summerise the output of following SVG code<svg xmlns="http://www.w3.org/2000/svg"> <rect x="50" y="50" width="100" height="75" rx="20" ry="20" fill="red" stroke="blue" /> <rect x="75" y="75" width="100" height="75" fill="yellow" stroke="blue" /></svg>

A. The following example creates an <svg> element that contains one rectangles. The first rectangle is red andhas rounded corners, as specified by the rx and ry attributes. The second rectangle is yellow, and partiallyobscures the first rectangle because it is defined after it in the <svg> element:

B. The following example creates an <svg> element that contains two rectangles. The first rectangle is yellowand has rounded corners, as specified by the rx and ry attributes. The second rectangle is red and partiallyobscures the first rectangle because it is defined after it in the <svg> element:

C. The following example creates an <svg> element that contains two rectangles. The first rectangle is red andhas not round corners, as specified by the rx and ry attributes. The second rectangle is yellow, and partiallyobscures the first rectangle because it is defined after it in the <svg> element:

D. The following example creates an <svg> element that contains two rectangles. The first rectangle is red andhas rounded corners, as specified by the rx and ry attributes. The second rectangle is yellow, and partiallyobscures the first rectangle because it is defined after it in the <svg> element:

Correct Answer: DSection: Module 11-Creating Advanced GraphicsExplanation

Explanation/Reference:

QUESTION 178which of the following statement is correct w.r.t canvas API and SVG

A. The Canvas API is an alternative to SVG graphics and is useful if you want to perform one-off graphicaloperations in a web page

B. The Canvas API is replacement for SVG graphics and is useful if you want to perform one-off graphicaloperations in a web page

C. The Canvas API is same as the SVG graphics and is useful if you want to perform one-off graphicaloperations in a web page

D. Non of the above

Correct Answer: ASection: Module 11-Creating Advanced GraphicsExplanation

Page 67: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

Explanation/Reference:

QUESTION 179Which model used by Canvas API

A. The Canvas API uses a "fill-and-forget" model.B. The Canvas API uses a "fuild-and-forget" model.C. The Canvas API uses a "file-and-forget" model.D. The Canvas API uses a "fire-and-forget" model.

Correct Answer: DSection: Module 11-Creating Advanced GraphicsExplanation

Explanation/Reference:

QUESTION 180Select the proper numbers and fill the blanksCanvas API is JavaScript APIs and drawing primitives with [ ] methods and [ ] attributesa) 31 b) 55 c) 21 d) 45

Correct Answer: Canvas API is JavaScript APIs and drawing primitives with [45] methods and [21] attributesSection: Module 11-Creating Advanced GraphicsExplanation

Explanation/Reference:Canvas API is JavaScript APIs and drawing primitives with [45] methods and [21] attributes

QUESTION 181Which is following is true statement

A. DOM support for canvasB. DOM partially support for canvasC. DOM not support for canvasD. Non of the above

Correct Answer: CSection: Module 11-Creating Advanced GraphicsExplanation

Explanation/Reference:Canvas is box for painting so no DOM support needed.

QUESTION 182 In html page canvas element is there <canvas id="myCanvas">No canvas support in this browser</canvas> after calling document.getElementById(myCanvas) what is reply from this method ?

A. <canvas> element foundB. ErrorC. do not recognize the <canvas> element.D. Non of the above

Page 68: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

Correct Answer: CSection: Module 11-Creating Advanced GraphicsExplanation

Explanation/Reference:

QUESTION 183What happens if you do not set the transition-duration property of a CSS transition?

A. The transition occurs after some immediately.B. The transition not occurs at all.C. The transition occurs immediately.D. Non of the above

Correct Answer: CSection: Module 12-Animating the User InterfaceExplanation

Explanation/Reference:

QUESTION 184Which of the following operations can you NOT perform by using a CSS transformation?

A. RotateB. TranslateC. AnimateD. Skew

Correct Answer: CSection: Module 12-Animating the User InterfaceExplanation

Explanation/Reference:

QUESTION 185Web socket clients send and receive data over an HTTP connection. True or False?

A. FalseB. TrueC.D.

Correct Answer: ASection: Module 13-Implementing Real-time Communication by Using Web SocketsExplanation

Explanation/Reference:

QUESTION 186How does a client create a connection to a web socket server?

Page 69: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

A. The client uses the open() function of the WebSocket object and specifies the URL of the server.B. The client uses the connect() function of the WebSocket object and specifies the URL of the server.C. Web sockets use a stateless protocol similar to HTTP. A client application simply specifies the address of

the server as a parameter of the send() function of the WebSocket object. A connection is automaticallyestablished while the message is sent and then closed.

D. The client creates a new WebSocket object and specifies the URL of the server.

Correct Answer: DSection: Module 13-Implementing Real-time Communication by Using Web SocketsExplanation

Explanation/Reference:

QUESTION 187What are the two established ways to implement real-time communications

A. Continuous pollingB. Long pollingC. Async pollingD. Sync pooling

Correct Answer: ABSection: Module 13-Implementing Real-time Communication by Using Web SocketsExplanation

Explanation/Reference:When creating real-time web applications, the need for continuous communication between the web page in abrowser and the web server is paramount. As soon as a user views a web page, the data it displays mightalready be obsolete; stock values may have fallen or risen, or the tickets for a concert may have sold out. Agreat deal of data is time dependent. Users must be able to trust the information on the page in front of themwithout having to refresh it constantly. There are two established ways to implement real-time communications: · Continuous polling. The page connects to the server and sends an AJAX request to the server for newdata. The server instantly responds, indicating that the data has not changed since the last request, or sendsback the new data. The page then closes the connection. This process is repeated every few seconds.

· Long polling. The page connects to the server, setting the connection timeout value to a very long periodof time (up to several hours, depending on the application), and then sends a request to the server for newdata. The server only replies if it has new data to send. The connection is closed when either the timeout periodis reached or new data is sent to the page. The process then starts again. This mechanism has an advantageover the continuous polling approach in that the overhead of opening and closing many short-lived networkconnections is reduced, but the cost is the need to maintain an open network channel to the server. The servermay only be able to support a limited number of concurrent network connections, and a web page may not beable to connect to a server when this limit is reached

QUESTION 188Which of following is correct statement about web socket ?

A. Web socket-enabled web applications are only supported on all Internet Information Services versionsB. Web socket-enabled web applications are only supported on Internet Information Services 7C. Web socket-enabled web applications are only supported on Internet Information Services 8D. Non of the above

Correct Answer: CSection: Module 13-Implementing Real-time Communication by Using Web Sockets

Page 70: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

Explanation

Explanation/Reference:

QUESTION 189Shared web workers can share data in the DOM of a web page, but dedicated web workers cannot. True orfalse?

A. FalseB. TrueC.D.

Correct Answer: ASection: Module 14-Performing Background Processing by Using Web WorkersExplanation

Explanation/Reference:

QUESTION 190How does a web page communicate with a web worker?

A. A web page and a web worker communicate by recieving messages.B. A web page and a web worker can not communicate at allC. A web page and a web worker communicate by sending and receiveing messages.D. Non of the above

Correct Answer: CSection: Module 14-Performing Background Processing by Using Web WorkersExplanation

Explanation/Reference:

QUESTION 191Which of following statement is correct about web worker ?

A. Web workers enable you to perform long-running tasks synchronously, enabling the browser to remainresponsive

B. Web workers enable you to perform long-running tasks in faster speed, enabling the browser to remainresponsive

C. Web workers enable you to perform long-running tasks asynchronously, enabling the browser to remainresponsive

D. Non of the above

Correct Answer: CSection: Module 14-Performing Background Processing by Using Web WorkersExplanation

Explanation/Reference:

QUESTION 192Web workers are ideally suited to a variety of scenarios

Page 71: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

A. Creating static web siteB. Performing lengthy calculationsC. Dividing work between concurrent threadsD. Performing long-running or slow I/O operations

Correct Answer: BCDSection: Module 14-Performing Background Processing by Using Web WorkersExplanation

Explanation/Reference:Web workers are ideally suited to a variety of scenarios, including: · Performing long-running or slow I/O operations. A web worker could be used to send data to a webservice and await a response, while the web page continues running. Alternatively, a web worker could use theFile API to read data from the local file system for processing, and then upload this data to a web service orpass it to the web page for display. · Performing lengthy calculations. A web worker could be used to implement a complex algorithm thatimplements a computation-intensive calculation. The results can be returned to the web page when thecalculation is complete. · Dividing work between concurrent threads. Operations that involve processing a large amount of data,such as the information held in a large array or a file on disk, could be delegated to a collection of concurrentweb workers. A master web-worker initiated by the web page can act as a controller that creates subordinateweb workers and delegates work to them. The master web worker aggregates the results and sends them backto the web page. If the computer running the browser has a processor with multiple cores, and depending onhow the browser implements web workers, this model provides a good way to exploit the parallel processingcapabilities of the processor.

QUESTION 193What are the two types of web worker ?

A. pulled workersB. dedicated workersC. satellite workersD. shared workers

Correct Answer: BDSection: Module 14-Performing Background Processing by Using Web WorkersExplanation

Explanation/Reference:A dedicated worker is the exclusive property of the page that created it. It runs asynchronously from the page,but can be controlled by the page. Only the page that created the worker can post messages to it and receivemessages back from it. A dedicated web worker can be terminated by the page that created it. Note that if theweb page is closed (if the browser terminates, or the user navigates to a different page), then any dedicatedweb workers created by that page will stop. A web worker can also forcibly terminate itself. A dedicated workeris ideal for performing a long-running task on behalf of a web page, such as uploading a large file or processinga large amount of data.A shared worker is created by one page, but other pages running as part of the same web application can postmessages to, and receive messages from, the same shared worker. Shared workers can be controlled by anypage in the web application. Shared workers stop if the user navigates to a different website.

A shared worker provides a mechanism for implementing centralized application processes, and can also beused to implement cross-page communication. For example, a shopping cart on a catalog site could beimplemented by using a shared worker that uses AJAX methods to quietly download and share very detailedproduct information for items in the cart

QUESTION 194

Page 72: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

How to create web worker ?

A. var webWorker; if( typeof(Worker)== "undefined") { webWorker = new Worker("processScript.js"); }

B. var webWorker; if( typeof(Worker)= "undefined") { webWorker = new Worker("processScript.js"); }

C. var webWorker; if( typeof(Worker)!== "undefined") { webWorker = new Worker("processScript.js"); }

D. Non of the above

Correct Answer: CSection: Module 14-Performing Background Processing by Using Web WorkersExplanation

Explanation/Reference:

QUESTION 195How to stop web worker ?

A. webWorker.sleep();B. webWorker.stop();C. webWorker.shutdown();D. webWorker.Terminate();

Correct Answer: DSection: Module 14-Performing Background Processing by Using Web WorkersExplanation

Explanation/Reference:

QUESTION 196How Web workers may also terminate themselves?

A. self.poweroff();B. self.exit();C. self.abandom();D. self.close();

Correct Answer: DSection: Module 14-Performing Background Processing by Using Web WorkersExplanation

Explanation/Reference:

QUESTION 197To send a message to a web worker, the web page can use ?

Page 73: 70-480 : Programming in HTML 5 With JavaScript and … · 2015-08-25 · A. Hyper Tranformation Markup Language B. Hyper Text Markup Lookup C. Hyper Text Markup Language D. Higher

A. postMessage() function of the web worker objectB. putMessage() function of the web worker objectC. GetMessage() function of the web worker object D. Non of the above

Correct Answer: ASection: Module 14-Performing Background Processing by Using Web WorkersExplanation

Explanation/Reference:

http://www.gratisexam.com/


Recommended