This set of HTML Questions and Answers for Aptitude test focuses on “Compatibility Libraries”.
b) HTML5 Shiv
c) HTML5 Shim
d) HTML5 Sham
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
Explanation: All steps are required.
3. Which property is used to detect the browser’s user agent and code based on the pertinent cases?
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
Explanation: The navigator object contains information about the browser. UseAgent property gives user-agent header sent by browser to the server. A navigator.userAgent is used to detect the browser’s user agent and code based on the pertinent cases.
d) Google API
6. ____________ allows you to add custom styles to the document and test an element afterwards.
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.
8. ___________ is used to test whether geolocation is supported in old browsers.
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. Modernizr.load objects print out on your page in the exact spot they should be, coming after the Modernizr.
Sanfoundry Global Education & Learning Series – HTML.
To practice all areas of HTML for Aptitude test, here is complete set of 1000+ Multiple Choice Questions and Answers.