HTML Questions & Answers – HTML Plugins – 1

This set of HTML Multiple Choice Questions & Answers (MCQs) focuses on “HTML Plugins – 1”.

1. Which of the following plug-in can’t be embedded by <object> element?
a) Java applets
b) Flash players
c) PDF readers
d) Map
View Answer

Answer: d
Explanation: All the browsers support <object> element. It also defines an embedded object within the HTML document. It is used for embedding plug-ins like PDF readers, Flash Players, Java applets in the web page.

2. What is the prefix of all the browser-specific functions?
a) NPP
b) UPP
c) NPN
d) GPN
View Answer

Answer: c
Explanation: It is a convention that all of the browser specific functions have the prefix ‘”NPN” and all of the plug-in specific functions have the prefix “NPP”. Gecko calls plug-in API function NP_Initialize at the time when plug-in code first loaded.

3. When is the instance created, which plug-in API function is called?
a) NPP_Destroy
b) NPP_New
c) NP_Shutdown
d) NP_Initialize
View Answer

Answer: b
Explanation: NPP_New function is called by the browser when an instance is created. There can exist multiple instances of the same plug-in. There are two conditions for it first if there are multiple embedded objects on a single page, second if several browser windows are open.
advertisement
advertisement

4. Which function will be called when the last instance of a plug-in is deleted?
a) NPP_Destroy
b) NP_Initialize
c) NPP_New
d) NP_Shutdown
View Answer

Answer: d
Explanation: When the last instance of a plug-in is deleted Gecko calls the function NP_Shutdown. The plug-in code is unloaded from memory. Plug-ins consume no resources when not loaded, it only consumes a little disk space.

5. When the user leaves instance’s page which function is called?
a) NPP_New
b) NPP_Destroy
c) NP_Shutdown
d) NP_Initialize
View Answer

Answer: b
Explanation: When the user leaves instance’s page or closes its window a plug-in instance is deleted. Then Gecko calls the function NPP_Destroy to inform plug-in that the instance is being deleted. Plug-in API calls and callbacks use main Navigator thread.

6. Which of the following is not the directory in Windows for plug-ins?
a) Profile directory/Library/Internet
b) MOZ_PLUGIN_PATH
c) HKEY_CURRENT_USER
d) ~/Library/Internet Plug-Ins
View Answer

Answer: d
Explanation: When Gecko based browser starts, it checks certain directories for plugins. Windows have MOZ_PLUGIN_PATH, Profile directory\plugins, %APPDAT%/Mozilla\plugins, Plug-ins with toolkit bundles, HKEY_CURRENT_USER\Software\MozillaPlugins\*\Path are some of the directories in windows.

7. Which of the following is not the directory in Mac OS X for plug-ins?
a) /Library/Internet
b) ~/Library/Internet
c) Profile directory
d) MOZ_PLUGIN_PATH
View Answer

Answer: d
Explanation: /Library/Internet Plug-Ins, ~/Library/Internet Plug-Ins, Plug-ins with the toolkit bundles, /System/Library/Frameworks/JavaVM.framework/Versions/Current/Resources, Profile directory/plugins are some of the directories in Mac OS X for plug-ins.
advertisement

8. Which of the following is not a directory in Linux for plug-ins?
a) ~/.mozilla/plugins
b) /usr/lib64/Mozilla/plugins
c) profile directory
d) /Library/Internet plug-ins
View Answer

Answer: d
Explanation: Profile directory/plugins, /usr/lib64/Mozilla/plugins, /usr/lib/Mozilla/plugins, ~/.mozilla/plugins are some of the directories in Linux for using plug-ins. /usr/lib64/firefox/plugins is for 64-bit Firefox.

9. Which of the following plug-in file type is used in MS Windows?
a) .DLL
b) .SO
c) .DSO
d) PPC
View Answer

Answer: a
Explanation: The plug-in file type depends on the platform. The file type in MS Windows is .DLL which is Dynamic Link Library files. Unix has .SO or .DSO files which are shared objects. MAC OS X has file PPC/x86/Universal loadable Mach-O bundle.
advertisement

10. The plug-in DLL can’t contain ______________
a) Language
b) ProductName
c) FileDescription
d) DirectoryName
View Answer

Answer: d
Explanation: The plug-in DLL should contain FileExtents which specifies file extensions, ProductName which is for plug-in name, Language for the language which is in use, FileDescription for the description, MIMEType for the MIME types, FileOpenName for file open template.

Sanfoundry Global Education & Learning Series – HTML.

To practice all areas of HTML, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.