Ensurepass.com : Ensure you pass the IT Exams
2018 May Microsoft Official New Released 70-480
100% Free Download! 100% Pass Guaranteed!

Programming in HTML5 with JavaScript and CSS3

Question No: 71 – (Topic 2)

You are modifying a blog site to improve search engine readability.

You need to group relevant page content together to maximize search engine readability. Which tag should you use?

  1. lt;navgt;

  2. lt;articlegt;

  3. lt;spangt;

  4. lt;divgt;

Answer: B

Explanation: The lt;articlegt; tag specifies independent, self-contained content.

An article should make sense on its own and it should be possible to distribute it independently from the rest of the site.

Potential sources for the lt;articlegt; element:

Forum post Blog post News story Comment

Reference: HTML lt;articlegt; Tag http://www.w3schools.com/tags/tag_article.asp http://www.w3schools.com/html/html5_new_elements.asp

Question No: 72 – (Topic 2)

You create an application that sends information to a web service by using the following code: (Line numbers are included for reference only.)

Ensurepass 2018 PDF and VCE

When the web service returns a non-zero result code, you must raise an exception that contains the result code.

You need to implement the code that generates the exception. Which line of code should you insert at line 04?

  1. CustomError.prototype = Error.prototype;

  2. CustomError [quot;ErrorTypequot;] = Error;

  3. CustomError.customError = true;

  4. Error-constructor = CustomError;

Answer: A

Explanation: * Object.prototype.constructor

Returns a reference to the Object function that created the instance#39;s prototype. Note that the value of this property is a reference to the function itself, not a string containing the function#39;s name. The value is only read-only for primitive values such as 1, true and quot;testquot;.

  • The constructor property is created together with the function as a single property of func.prototype.

    Reference: Object.prototype.constructor

    Question No: 73 – (Topic 2)

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

    lt;input id=quot;txtValuequot;/gt;

    You need to develop the form so that customers can enter only a valid country code consisting of three English alphabet characters.

    Which code segment should you use?

    Ensurepass 2018 PDF and VCE

    1. Option A

    2. Option B

    3. Option C

    4. Option D

    Answer: C

    Explanation: * The val() method returns or sets the value attribute of the selected elements.

  • HTML lt;inputgt; pattern Attribute

    The pattern attribute specifies a regular expression that the lt;inputgt; element#39;s value is checked against.

    Example

    An HTML form with an input field that can contain only three letters (no numbers or special characters):

    lt;form action=quot;demo_form.aspquot;gt;

    Country code: lt;input type=quot;textquot; name=quot;country_codequot; pattern=quot;[A-Za-z]{3}quot; title=quot;Three letter country codequot;gt;

    lt;input type=quot;submitquot;gt;

    lt;/formgt;

    Reference: HTML lt;inputgt; pattern Attribute http://www.w3schools.com/tags/att_input_pattern.asp

    Question No: 74 – (Topic 2)

    You are developing application web form by using HTML5 and JavaScript. You need to prevent users from submitting form data more than once.

    Which code segment should you use?

    Ensurepass 2018 PDF and VCE

    1. Option A

    2. Option B

    3. Option C

    4. Option D

    Answer: A

    Explanation: * this, in disable(this), refers to the clicked button.

  • The disabled attribute is a boolean attribute.

When present, it specifies that the lt;inputgt; element should be disabled. A disabled input element is unusable and un-clickable.

The disabled attribute can be set to keep a user from using the lt;inputgt; element until some other condition has been met (like selecting a checkbox, etc.). Then, a JavaScript could remove the disabled value, and make the lt;inputgt; element usable.

Reference: HTML lt;inputgt; disabled Attribute

Question No: 75 – (Topic 2)

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

lt;input id=quot;txtValuequot;/gt;

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

Which HTML should you use?

  1. lt;input id=quot;txtValuequot; type=quot;countryquot;/gt;

  2. lt;input id=quot;txtValuequot; type=quot;textquot; required=quot;xxxquot;/gt;

  3. lt;input id=quot;txtVa!uequot; type=quot;textquot; pattern-quot; [A-Za-z] {3} quot;/gt;

  4. lt;input id=quot;txtValuen type=quot;codequot; patternquot;=quot;countryquot;/gt;

Answer: C

Explanation: HTML lt;inputgt; pattern Attribute

The pattern attribute specifies a regular expression that the lt;inputgt; element#39;s value is checked against.

Example

An HTML form with an input field that can contain only three letters (no numbers or special characters):

lt;form action=quot;demo_form.aspquot;gt;

Country code: lt;input type=quot;textquot; name=quot;country_codequot; pattern=quot;[A-Za-z]{3}quot; title=quot;Three letter country codequot;gt;

lt;input type=quot;submitquot;gt;

lt;/formgt;

Reference: HTML lt;inputgt; pattern Attribute http://www.w3schools.com/tags/att_input_pattern.asp

Question No: 76 HOTSPOT – (Topic 2)

You are reviewing the CSS markup for an HTML5 page that displays a news article. The CSS markup for the page is as follows:

Ensurepass 2018 PDF and VCE

The HTML markup for the page is as follows:

Ensurepass 2018 PDF and VCE

For each statement in the table, select Yes if the code segments above causes the page to behave as described. Select No if it does not. Make only one selection in each column.

Ensurepass 2018 PDF and VCE

Answer:

Ensurepass 2018 PDF and VCE

Question No: 77 – (Topic 2)

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?

  1. SVG

  2. CANVAS

  3. SAMP

  4. AREA

Answer: A

Explanation: * SVG stands for Scalable Vector Graphics SVG is used to define graphics for the Web

SVG is a W3C recommendation

* The HTML lt;svggt; element (introduced in HTML5) is a container for SVG graphics. SVG has several methods for drawing paths, boxes, circles, text, and graphic images. Reference: HTML5 SVG

Question No: 78 – (Topic 2)

You are developing an HTML5 web application and are styling text. You need to use the text-transform CSS property.

Which value is valid for the text-transform property?

  1. Italic

  2. Line-through

  3. Capitalize

  4. 20px

Answer: C

Explanation: CSS Syntax

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

Example

Transform text in different elements: h1 {text-transform:uppercase;}

h2 {text-transform:capitalize;} p {text-transform:lowercase;}

Reference: CSS text-transform Property http://www.w3schools.com/cssref/pr_text_text-transform.asp

Question No: 79 DRAG DROP – (Topic 2)

You are developing an application that reads information from a file.

The application must:

-> Execute a block of code if there is an error accessing the file

-> Execute a second block of code whether or not there is an error accessing the file

You need to ensure that the error handling requirements are met.

Which three statements should you implement in sequence? (To answer, move the appropriate statements from the list of actions to the answer area and arrange them in the correct order.)

Ensurepass 2018 PDF and VCE

Answer:

Ensurepass 2018 PDF and VCE

Ensurepass 2018 PDF and VCE

Explanation:

Explanation

The fileopen statement is put within the try clause. The catch(e) will catch a fileopen error.

The finally clause will be executed regardless of whether an error occurs in the try clause proceeding it

Question No: 80 – (Topic 2)

You are developing an application that consumes an external web service that returns the latest stock rate.

The application has two methods:

-> The getResults() method makes an AJAX web service request

-> The ShowRate() method displays the stock rate from the web service response

You need to ensure that the ShowRate() method always displays the latest stock rate. Which code segment should you use?

Ensurepass 2018 PDF and VCE

  1. Option A

  2. Option B

  3. Option C

  4. Option D

Answer: D

Explanation: quot; always displays the latest stock rate quot;. Should use cache: false

Note: cache (default: true, false for dataType #39;script#39; and #39;jsonp#39;) Type: Boolean

If set to false, it will force requested pages not to be cached by the browser. Reference: jQuery.ajax()

100% Ensurepass Free Download!
Download Free Demo:70-480 Demo PDF
100% Ensurepass Free Guaranteed!
Download 2018 EnsurePass 70-480 Full Exam PDF and VCE

EnsurePass ExamCollection Testking
Lowest Price Guarantee Yes No No
Up-to-Dated Yes No No
Real Questions Yes No No
Explanation Yes No No
PDF VCE Yes No No
Free VCE Simulator Yes No No
Instant Download Yes No No

Comments are closed.