HTML Multiple Choice Questions & Answers on Compatibility Libraries for Freshers

1. Which one of the following is an open source JavaScript library that enables styling for HTML5 elements in versions of Internet Explorer before IE 9 ?

a) HTML5
b) HTML5 Shiv
c) HTML5 Shim
d) None of the mentioned
Answer: b

Explanation: HTML5 Shiv is a JavaScript workaround, invented by Sjoerd Visscher, to enable styling of HTML5 elements in versions of Internet Explorer prior to version 9, which do not allow unknown elements to be styled without JavaScript.
2. Which one of the following is not a step to install a library you need to perform the compatibility in browsers ?

a) Download the library from the github location
b) Uncompress the file
c) Insert the following code inside the head tag
d) None of the mentioned
Answer: d

Explanation: All steps are required.
3. Which property is used to detect the browser’s user agent and code based on the pertinent cases?

a) navigator.userAgent
b) navigator.user
c) navigator
d) return
Answer: a

Explanation: An old strategy was to look at the property navigator.userAgent to detect the browser’s user agent and code based on the pertinent cases.
4. Some users have requested tests for IE’s float double margin bug, and support for position:fixed. Which API is suitable for them?

a) mq() media Plugin API
b) addTest() Plugin API
c) testAllProps() Plugin API
d) none of the mentioned
Answer: b

Explanation: A custom plug-in uses code that you write and attach to a load test or a Web performance test.
5. ___________ is an open source JavaScript library that allows support for different levels of experiences based on the capabilities of each browser.

a) Navigator
b) Modernizr
c) Geolocation
d) Google API
Answer: b

Explanation: Modernizr is an open source JavaScript library that allows support for different levels of experiences based on the capabilities of each browser using a simple feature detection model.
6. ____________ allows you to add custom styles to the document and test an element afterwards.

a) hasEvent()
b) testAllProps()
c) testProp()
d) modernizr.testStyles()
Answer: d

Explanation: Modernizr.testStyles() allows you to add custom styles to the document and test an element afterwards. An element with the id of “modernizr” is injected into the page.
7. Modernizr does actually add missing functionalities to browsers save for the HTML5 tags styling support.

a) True
b) False
Answer: b

Explanation: Modernizr, in spite of its name, does not actually add missing functionalities to browsers save for the HTML5 tags styling support.
8. ___________ is used to test whether geolocation is supported in old browsers.

a) Modernizr
b) Modernizr.geolocation
c) Navigator.userAgent
d) Modernizr.js
Answer: c

Explanation: Since Modernizr is a JavaScript object with methods, we can use Modernizr.geolocation to test whether geolocation is supported.
9. ____________ is a resource loader (CSS and JavaScript) that was made to specifically to work side-by-side with Modernizr.

a) HasEvent()
b) Navigator.userAgent
c) Modernizr.load
d) None of the mentioned
Answer: c

Explanation: Modernizr.load is optional in your build, but if you are loading polyfills, there’s a good chance it can save you some bandwidth and boost performance a bit.
10. In case we want to implement a JavaScript fallback, we would need to create a conditional statement using Modernizr.

a) True
b) False
Answer: a

Explanation: Modernizr is a JavaScript library that detects which HTML5 and CSS3 features your visitor’s browser supports.

Related

Objective type questions in JSP

Top JSP multiple choice questions 1. Choose the statement that best describes the relationship between JSP and servlets: A. Servlets are built on JSP semantics and all servlets are compiled to JSP...

Data Structures Multiple Choice Questions and Answers on Threaded Binary Tree

1. What is a threaded binary tree traversal? a) a binary tree traversal using stacksb) a binary tree traversal using queuesc) a binary tree traversal using stacks and queuesd) a binary tree travers...

Objective Questions and Answers in Data Structure

1. On which prinicple does stack work? A. FILOB. FIFOC. LILOD. Both a and c above Ans: A 2. Can linked list be implemented using arrays? A. YesB. No Ans: A 3. Two dimensional arrays are also c...

Post a Comment

emo-but-icon
:noprob:
:smile:
:shy:
:trope:
:sneered:
:happy:
:escort:
:rapt:
:love:
:heart:
:angry:
:hate:
:sad:
:sigh:
:disappointed:
:cry:
:fear:
:surprise:
:unbelieve:
:shit:
:like:
:dislike:
:clap:
:cuff:
:fist:
:ok:
:file:
:link:
:place:
:contact:

item