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
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?
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?
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.
4. Which function will be called when the last instance of a plug-in is deleted?
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?
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
d) ~/Library/Internet Plug-Ins
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?
c) Profile directory
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.
8. Which of the following is not a directory in Linux for plug-ins?
c) profile directory
d) /Library/Internet plug-ins
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?
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.
10. The plug-in DLL can’t contain ______________
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.