Q.1 What is the HTML5 Stack?
A. HTML5, CSS3, JavaScript
B. HTML5, PHP, MySQL
C. HTML5, CSS2, JavaScript
D. HTML5, PHP, JavaScript
Ans : HTML5, CSS3, JavaScript
Q.2 Which of the following input controls represents a date (year, month, day) encoded according to ISO 8601 in Web Form 2.0?
A. datetime
B. month
C. datetime-local
D. date
Ans : date
Q.3 What is the recommended method to detect browser compatibility for features?
A. Use Modernizr
B. Application automatically detects
C. Use navigator.UserAgent method
D. None of the options
Ans : Use Modernizr
Q.4 Which of the following tag represents an independent piece of content of a document in HTML5?
A. section
B. article
C. footer
D. nav
Ans : article
Q.5 Which HTML5 tag would you use to define footer?
A. foot
B. footer
C. body
D. bottom
Ans : footer
Q.6 What happens if you view a new HTML5 form input type in an older browser?
A. It does not show input
B. It reverts to standard text input
C. The form will not load
D. The page will not load
Ans : It reverts to standard text input
Q.7 Which of the following attributes triggers events when a form changes?
A. onforminput
B. onformchange
C. onchange
D. onedit
Ans : onformchange
Q.8 Which of the following tags represents a section of a document used for navigation?
A. nav
B. section
C. footer
D. navigation
Ans : nav
Q.9 Which of the following tags are no longer valid in HTML5?
A. align
B. p
C. span
D. div
Ans : align
Q.10 Which Semantic element is best suitable for content, like a blog post, that is self-contained, independent, and can be republished?
A. div
B. section
C. article
D. aside
Ans : section
Q.11 What are the new form elements introduced in HTML5?
A. optgroup, button, keygen
B. datalist, keygen, output
C. optgroup, button, datalist
D. datalist, keygen, button
Ans : datalist, keygen, output
Q.12 HTML5 audio tag has a number of attributes to control the look and feel and various functionalities of the audio player. The following are attributes of HTML5 audio element, except ________.
A. autoplay
B. controls
C. stop
D. src
Ans : src
Q.13 Which attribute of the video tag specifies an image to be shown while the video is downloading?
A. fig
B. src
C. img
D. poster
Ans : poster
Q.14 Audio element can be programmatically controlled from _______.
A. HTML or CSS or JavaScript
B. HTML
C. CSS
D. Javascript
Ans : HTML or CSS or JavaScript
Q.15 You can embed a video player using _______.
A. src
B. source
C. vid
D. iframe
Ans : iframe
Q.16 The controls attribute adds audio/video controls like PLAY, PAUSE and VOLUME.
A. True
B. False
Ans : True
Q.17 Audio element can be programmatically controlled from ______.
A. HTML or CSS or JavaScript
B. HTML
C. CSS
D. Javascript
Ans : HTML
Q.18 SVG is mostly useful for vector type diagrams like ______.
A. Charts and 3D Graphs
B. Charts and 2D Graphs
C. 2D Graphs
D. 3D Graphs
Ans : Charts and 2D Graphs
Q.19 How do you place a canvas element with an ID of canvas1 into a JavaScript variable?
A. var canvas1 = document.getElementById(‘canvas1’);
B. var canvas1 = document.get(‘#canvas1’);
C. var canvas1 = getElementById(‘canvas1’);
D. var canvas1 = document.getElement(‘canvas1’);
Ans : var canvas1 = document.getElementById(‘canvas1’);
Q.20 Which of the following is true about ‘canvas’ tag in HTML5?
(I) Easy way to draw graphics using JavaScript
(II) Can be used to make Animations
A. None of the options
B. Both I and II
C. II
D. I
Ans : Both I and II
Q.21 The following are true about Canvas, except _______.
A. Canvas renders graphics pixel by pixel
B. Each shape in Canvas is looked at as an object
C. Canvas is well suited for intense graphics
D. Canvas draws graphics on the fly using JavaScript
Ans : Each shape in Canvas is looked at as an object
Q.22 The following are true about SVG graphics, except ______.
A. Graphics in SVG are defined in XML
B. SVGs do not lose quality when zoomed
C. SVG is mostly used for graphs
D. Graphics in SVG are defined using JavaScript
Ans : Graphics in SVG are defined using JavaScript
Q.23 Which is best suited for applications with large rendering areas, like Google maps?
A. None of the options
B. Canvas and SVG
C. SVG
D. Canvas
Ans : SVG
Q.24 Scalable Vector Graphics are defined in which markup language?
A. XML
B. Native HTML
C. HTML5
D. DHTML
Ans : XML
Q.25 Web Apps can start faster and work even if there is no internet connection when you use ______.
A. Session Storage
B. Local Storage
C. App cache
D. Cloud
Ans : App cache
Q.26 Application Cache enables _______.
A. All the options
B. Reduction of Server Load
C. Offline Browsing
D. Higher Speed
Ans : All the options
Q.27 The following are LocalStorage functions, except ______.
A. getItem()
B. setItem()
C. getElementbyID()
D. removeItem()
Ans : getElementbyID()
Q.28 Which of the following APIs can be used to suggest nearby restaurants in a restaurant finder app?
A. Local Storage
B. Cache API
C. Web Workers
D. Geolocation API
Ans : Geolocation API
Q.29 Which API can be used to display the thumbnail image of a file being uploaded in a HTML5 photo sharing website?
A. File API
B. Web Storage API
C. Device Access API
D. Cache API
Ans : File API
Q.30 Which of the following attributes triggers event when an element is dragged?
A. ondragenter
B. ondrag
C. ondragevent
D. ondragdrop
Ans : ondrag
Q.31 Application Cache enables _______.
A. Higher Speed
B. Offline Browsing
C. Reduction of Server Load
D. All the options
Ans : All the options
Q.32 Which of the following attributes triggers event when the window loses focus?
A. onlastfocus
B. onblur
C. lostfocus
D. onbeforeload
Ans : onblur
Q.33 Websites can store data on the user’s computer using Web Storage. How is Web Storage different from Cookies?
A. More secure
B. Can store more data
C. All the options
D. Web Storage is faster
Ans : All the options
Q.34 Which of the following attributes specifies whether a user is allowed to drag an element or not?
A. drag
B. dragdrop
C. draggable
D. context
Ans : draggable
Q.35 Which of the following input controls represents a date consisting of a year and a week number encoded according to ISO 8601 in Web Form 2.0?
A. Week
B. Number
C. Range
D. Time
Ans : Week
Q.36 Which plugin is required to use SVG tags in HTML5?
A. Vector Graphics
B. Does not require a plugin
C. Modernizr
D. Graphics
Ans : Graphics
Q.37 The following are suited for game applications, except ______.
A. SVG
B. Canvas and SVG
C. Canvas
D. None of the options
Ans : Canvas and SVG
Q.38 A semantic element clearly describes its meaning to the ______.
A. Browser
B. Browser and Developer
C. None of the options
D. Developer
Ans : Browser and Developer
Q.39 Semantic HTML5 elements allows data to be shared and reused across applications, enterprises, and communities.
A. True
B. False
Ans : True