70-480 Exam - Programming in HTML5 with JavaScript and CSS3

certleader.com

Q1. You develop an HTML5 web application. The web application contains a form that allows users to enter only their month of birth. 

The value that the users enter must be numbers between 1 and 12, inclusive. 

You need to implement the form element for the month of birth. 

Which element should you use? 

A. <input type="time" options="month" /> 

B. <input types="submit" value="month" /> 

C. <input type="range" min="1" max="12" /> 

D. <input type="month" itemscope="numeric" /> 

Answer:

Q2. You are developing an HTML5 web application for a surveyor company that displays topographic images. 

The application must: 

Display the topographic images at different zoom levels without loss of detail Print the topographic images without loss of detail Work from only one source file for each topographic image 

You need to ensure that the topographic images display according to the requirements. 

Which HTML5 element should you use? 

A. SVG 

B. CANVAS 

C. SAMP 

D. AREA 

Answer:

Q3. You develop a webpage by using HTML5. You create the following markup: 

<input type "url" name= "website" required="required" /> 

You need to ensure that the value that the user enters contains a secure URL. 

What should you do? 

A. Add the following attribute to the input tag: value="https://v 

B. Add the following attribute to the input tag: pattern="https://.+" 

C. Add the following attribute to the input tag: value="ssl" 

D. Add the following attribute to the input tag: itemtype="https" 

Answer: B

Q4. You are creating a JavaScript object that represents a customer. 

You need to extend the Customer object by adding the GetCommission method. 

You need to ensure that all future instances of the Customer object implement the GetCommission method. 

Which code segment should you use? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer: D

Q5. You are developing a customer contact form that will be displayed on a page of a company's website. The page collects information about the customer. 

If a customer enters a value before submitting the form, it must be a valid email address. 

You need to ensure that the data validation requirement is met. 

What should you use? 

A. <input name="email" type="url"/> 

B. <input name="email" type="text" required="required"/> 

C. <input name="email" type="text"/> 

D. <input name="email" type="email"/> 

Answer:

Q6. You are developing a customer web form that includes the following HTML. 

<input id="txtValue"/> 

You need to change the HTML markup so that customers can enter only a valid three-letter country code. 

Which HTML should you use? 

A. <input id="txtValue" type="code" /> 

B. <input id="txtValue" type="text" pattern=" [A-Za-z] {3}" /> 

C. <input id="txtValue" type="text" required="required"/> 

D. <input id="txtValue" type="country" /> 

Answer:

Q7. You need to test the value of the following variable in JavaScript. 

var length = "75"; 

A block of code must execute if the length equals 75 regardless of the data type. 

You need to use the statement that meets this requirement. 

Which lines of code should you use? (Each correct answer presents a complete solution. Choose two.) 

A. if (length = = = 75) 

B. if (length = = 75) 

C. if (length! = 75) 

D. if (length = = "75") 

Answer: BD 

Q8. You are developing a web page that will contain an animated logo. The web page currently has a logo image on a canvas object. 

You need to spin the logo image on the canvas. 

Which method should you use? 

A. context.rotate() 

B. context.spin() 

C. context.translatePosition() 

D. context.setTransform() 

Answer: A

Q9. You develop an HTML5 application for a company. Employees must enter a personal identification number (PIN) in an INPUT element named SecurityCode to access their employee records. 

The SecurityCode element must meet the following requirements: 

Allow up to 6 digits. 

Do not display numbers as they are entered. 

Display the text Enter PIN Code before the user enters any data. 

You need to implement the SecurityCode element. 

Which HTML markup should you add to the application? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

E. Option E 

Answer: D

Q10. You are creating a JavaScript object that represents a customer. 

You need to extend the Customer object by adding the GetCommission() method. 

You need to ensure that all future instances of the Customer object implement the GetCommission() method. 

Which code segment should you use? 

A. Option A 

B. Option B 

C. Option C 

D. Option D 

Answer: