Training Questions and Answers 2025/2026
Which API enables the rendering of interactive 3D and 2D graphics in an HTML canvas
without the need for plug-ins?
Correct answer: WebGL API
How is WebGL used with the HTML5 <canvas> element?
Correct answer: canvas.getContext("webgl")
Which API permits the user to continue working with web sites and documents even
when a network connection is unavailable?
Correct answer: Offline Web Applications API
What provides a directory on a computer where applications can be stored and run
without access to the original application?
Correct answer: Application Cache
What file provides a list of files needed for a web application to work offline?
Correct answer: Manifest
How do you identify the manifest file to which a web page should link?
Correct answer: <html manifest="date.appcache">
Which API provides the ability to determine a user's location?
Correct answer: Geolocation API
Which method retrieves the current geographic location of the user?
Correct answer: getCurrentPosition()
, Which method retrieves periodic updates about the current geographic location of the
user?
Correct answer: watchPosition()
Which method cancels an ongoing watchPosition() call?
Correct answer: clearWatch()
Which API allows a user to grab an object on a computer screen and move it to a
different location on the screen?
Correct answer: Drag-and-Drop API
Which event specifies where the dragged data can be dropped?
Correct answer: dragover
Which attribute makes an element draggable?
Correct answer: draggable="true"
Which method prevents default action where data elements cannot be dropped in other
elements?
Correct answer: preventDefault()
Which event is called when a page element is dropped after being dragged?
Correct answer: drop
Which event listener triggers the drag event?
Correct answer: ondragstart
Which API provides a standard way to interact with files on the client machine using a
web browser?
Correct answer: File API